This is my program:
def count_occurances(lst): d = {} contents = lst #Filling the dictonary contents = map(str, contents) for contents in lst