Compute the maximum number of bases from BASEMAX.