code: def count_by(records: Sequence[Dict], field_name: str) -> defaultdict:
      
  
      counter = defaultdict(int)
  
      for record in records:
          name = record[field_name]
          counter[name] += 1
  
      return counter
docs: Frequency each value occurs in a record sequence for a given field name.