python count unique values in list of dicts