Counts occurrences of element.
element
int count(E object) => where((element) => element == object).length;