count method

int count(
  1. E object
)

Counts occurrences of element.

Implementation

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