def uniquify_labels(labels):
    """determines set of unique characters in labels (as returned by load_labels)
    and the number of occurences of each unique character

    Parameters
    ----------
    labels : list
        of str

    Returns
    -------
    unique_labels : set
        of char, e.g. {'0','a','b','c'}
    counts : dict
        where keys are unique_labels and values are counts
        e.g. {'0': 100,
              'a': 200,
              'b': 250,
              'c': 150}
    """

    all_labels = ''.join(labels)
    unique_labels = set(all_labels)

    counts = dict(zip(unique_labels, [0] * len(unique_labels)))

    for label in all_labels:
        counts[label] += 1

    return unique_labels, counts