def _Counter(lst):
    """
    count number of occurences of items in a list and return as dict
    @param lst a list
    @return dict linking list items to number of occurences 

    note this is idendical to collections.Counter (which was introduced with python 2.7)
    """
    cnt = {}
    for i in lst:
        try:
            cnt[i] += 1
        except KeyError:
            cnt[i] = 1
    return cnt
