counts method

Map<K, int> counts()

Implementation

Map<K, int> counts() {
  return {...?this?.map((k, v) => MapEntry(k, v.length))};
}