Yes, of course: the magical len() method!
len()
Might it be that values() returns the values of dictionary and not the number of values?
values()