code: def count_defaultdict(dict_of_lists: Mapping[X, List[Y]]) -> Mapping[X, typing.Counter[Y]]:
      
      return {
          k: Counter(v)
          for k, v in dict_of_lists.items()
      }
docs: Count the number of elements in each value of the dictionary.