from typing import Counter


def get_IOB_counts(sentences):
    """ Return a counter with IOB labels and their frequency.

    """
    types2 =[ j[1] for sublist in sentences for j in sublist] #list of IOBs
    ner_tags = Counter()

    for i,x in enumerate(types2):
        ner_tags[x] += 1

    return ner_tags