countWhere method

int countWhere(
  1. bool test(
    1. T
    )
)

Counts the elements for whichs the predicate holds.

See where.

Implementation

int countWhere(bool Function(T) test) {
  return where(test).length;
}