count method
Returns the number of elements passing the given test
.
If test
is not provided it returns the number of elements in the
Iterable.
Implementation
int count([bool Function(E element)? test]) =>
test == null ? length : where(test).length;