code: public static <T> Collector<T, ?, Integer> countingInt() {
          return PartialCollector.intSum().asRef((acc, t) -> acc[0]++);
      }
docs: Returns a {@code Collector} accepting elements of type {@code T} that
  counts the number of input elements and returns result as {@code Integer}
  . If no elements are present, the result is 0.
  
  @param <T> the type of the input elements
  @return a {@code Collector} that counts the input elements
  @since 0.3.3
  @see Collectors#counting()