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