Returns the total number of states in the basis (counting multiplicities multiple times)
References sectors.