Get the number of all keys in a dictionary of dictionaries in Python,len(dict_test) + sum(len(v) for v in dict_test.values())