def get_event_labels_counted(event_log, key):
    """
    Fetches the labels (and their frequency) present in a log, given a key to use within the events.

    Parameters
    ----------
    :param event_log: log to use
    :param key: to use for event identification, can for example  be "concept:name"

    Returns
    -------
    :return: a list of labels
    """
    labels = dict()
    for t in event_log:
        for e in t:
            if key in e:
                if e[key] not in labels:
                    labels[e[key]] = 0
                labels[e[key]] = labels[e[key]] + 1
    return labels