from typing import Counter


def count_error_types(graph):
    """Count the occurrence of each type of error in a graph.

    :param pybel.BELGraph graph: A BEL graph
    :return: A Counter of {error type: frequency}
    :rtype: collections.Counter
    """
    return Counter(e.__class__.__name__ for _, _, e, _ in graph.warnings)