[python] Python: count repeated elements in the list