count method

int count(
  1. T object
)

Returns the number of instances there are of object in this list.

Implementation

int count(T object) {
  var count = 0;
  for (var element in this) {
    if (object == element) count++;
  }
  return count;
}