get count of values associated with key in dict python,sum(1 if d['success'] else 0 for d in s)