How to determine the number of occurrences in a list using python ?