code: @NotNull
      public static <T> Collector<T, ?, Long> counting() {
          return summingLong(new ToLongFunction<T>() {
  
              @Override
              public long applyAsLong(T t) {
                  return 1L;
              }
          });
      }
docs: Returns a {@code Collector} that counts the number of input elements.
  
  @param <T> the type of the input elements
  @return a {@code Collector}