A count was originally just the king's companion
The noble title count comes from the Latin comes, meaning companion or attendant: someone sent to stand in for the ruler. England never adopted it and used earl instead, yet because no female form of earl ever emerged, an earl's wife is still a countess, borrowing the continental word.
In the late Roman Empire, comes labelled high-ranking courtiers and provincial officials. Before Anthemius became Western emperor in 467 he served as a military comes shoring up the Danube frontier. In the West the word loosely meant a commander, while in the Eastern Empire from about the seventh century it was a precise rank: leader of two centuriae, some 200 soldiers. Other counts ran finances, like the count of the sacred doles, a post held by the father of the writer Cassiodorus under Theodoric.
At first the job was not inherited. Medieval counts were officials serving at the king's pleasure until, during the 9th century, such offices became private family property, and wealthy counts could often, though not always, pass them to heirs. Only gradually did the title become tied to a particular territory, which is how county entered English, from Old French conté, a count's jurisdiction, eventually serving as a synonym for shire. In Piast Poland the office never became hereditary and later vanished, reappearing only after the Partitions as hrabia, from German Graf.
That German word has a separate root, traced to a Byzantine Greek term for someone who convenes a court. It combined with other words to make Markgraf, Landgraf, Burggraf for a castle count and Pfalzgraf for a count palatine. Unrelated officials also borrowed the ending; in the Low Countries a dijkgraaf still manages dykes and waterways.
Customs varied oddly. In some Italian states every son of a count was a contino, a little count, while Sweden treated counts created before 1809 differently from later ones. Dauphin was once a count's title in southern France until 1349, when it passed to the heir to the French throne. Spain's Gaspar de Guzmán kept his inherited countship alongside a new dukedom, becoming the Count-Duke of Olivares.
Source: Count