code: public static <E> int counti(Iterator<E> iterator) {
          final long value = reduce(iterator, new Count<E>(), 0l);
          dbc.state(value <= Integer.MAX_VALUE, "iterator size overflows an integer");
          return (int) value;
      }
docs: Counts elements contained in the iterator.
  
  @param <E> the iterator element type parameter
  @param iterator the iterator to be consumed
  @return the size of the iterator