public int numberOfElements ( ) { int n = 0 ; for ( SortedSet < Integer > cell : cells ) { n += cell . size ( ) ; } return n ; }
Calculate the size of the partition as the sum of the sizes of the cells .