code: public static <T> long count(Iterable<T> iterable, Filter<T> filter) {
  
      Assert.notNull(filter, "Filter is required");
  
      return StreamSupport.stream(nullSafeIterable(iterable).spliterator(), false)
        .filter(filter::accept)
        .count();
    }
docs: Counts the number of elements in the {@link Iterable} collection accepted by the {@link Filter}.
  
  @param <T> Class type of the elements in the {@link Iterable} collection.
  @param iterable {@link Iterable} collection of elements being evaluated.
  @param filter {@link Filter} used to determine the count of elements in the {@link Iterable} collection
  accepted by the {@link Filter}.
  @return an integer value indicating the number of elements in the {@link Iterable} collection accepted
  by the {@link Filter}.
  @throws IllegalArgumentException if {@link Filter} is null.
  @see java.lang.Iterable
  @see org.cp.elements.lang.Filter
  @see #nullSafeIterable(Iterable)