Teach dictionary to count the number of entries