count number of entries in dictionary python cont use len() code example
Example: get number of key in dictionary python
#Call len(obj) with a dictionary as obj to count the number
#of key-value pairs in the dictionary.
a_dictionary = {"a": 1, "b": 2}
print(len(a_dictionary))
OUTPUT:
2