code: public static <T> Number count(Iterable<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure closure) {
          return count(self.iterator(), closure);
      }
docs: Counts the number of occurrences which satisfy the given closure from inside this Iterable.
  <p>
  Example usage:
  <pre class="groovyTestCase">assert [2,4,2,1,3,5,2,4,3].count{ it % 2 == 0 } == 5</pre>
  
  @param self  the Iterable within which we count the number of occurrences
  @param closure a closure condition
  @return the number of occurrences
  @since 2.2.0