[python] Check if a given key already exists in a dictionary and increment it