Then the quantity w ( n , g ) (defined above as the number of ways to distribute n particles among the g sublevels of an energy level) is the cardinality of S ( n , g ) , i.e., the number of elements (or valid n -tuples) in S ( n , g ) . Thus the problem of finding an expression for w ( n , g ) becomes the problem of counting the elements in S ( n , g ) .