from typing import Counter


def count_uniq_statuscodes(log, position):
    """
    count uniq statuscodes

    looks up witch and how often witch statuscode was found

    :param log: the logfile
    :param position: the position of the statuscode in the log
    :return: a dict of statuscodes and how often they got found, and the total
             amount of statuscodes
    """

    statuscodes = []
    for entry in log:
        statuscodes.append(entry[position])
    statuscodes_counted = Counter(statuscodes)

    return statuscodes_counted, len(statuscodes)