- Edited
Or if you're using a newer version of python, you could simply use dict comprehension:
d = {k : a.count(k) for k in set(a)}
otherwised = dict([(k,a.count(k)) for k in set(a)])