Python count items in dict value that is a list,count = sum(len(v) for v in d.values())