how can i count the occurrences of an item in a list of dictionaries?,sum(1 for d in my_list if d.get('id') == 1)