Returns the number of elements matching the given test.
test
int count(bool Function(E element) test) { var count = 0; for (final current in this) { if (!test(current)) continue; count++; } return count; }