Count is one of those interesting words in which it's various meanings have nothing to do with each other.
Let's being with the origin of the word. It's origins date back to 13th century France. The word with it's Latin root means to calculate or compute in other words to count such as in numbers. It is later that the other meanings came into play.
Count: To calculate or recognize one by one to determine the total number, add up: He counted his tickets and found he had ten.
Count: To list or name the numbers: Close your eyes and count to ten.
Count: To consider or regard: She counted herself lucky to have survived the crash. Count me in.
Count: In some European countries a nobleman equivalent in rank to an English earl.