code: def count_operations(elements: Iterable[Operation]) \
          -> Dict[Type[Operation], int]:
      
      op_count: Dict[Type[Operation], int] = defaultdict(int)
      for elem in elements:
          op_count[type(elem)] += 1
      return dict(op_count)
docs: Return a count of different operation types given a colelction of
      operations, such as a Circuit or DAGCircuit