How to determine the number of times an item is repeated in a list in python?