From the error message, it is clear that you can not use function most_common() with a dictionary. You need to typecast dictionary to Counter and then you can use the function most_common().
Check the following example:
>>> from collections import Counter
>>> aa={'a':10,'b':8,'c':25,'d':15,'e':12}
>>> Counter(aa).most_common()
[('c', 25), ('d', 15), ('e', 12), ('a', 10), ('b', 8)]
>>> Counter(aa).most_common(2)
[('c', 25), ('d', 15)]