Note:Note: Tracking the origins of phrases is impossible most of the time! Mostly, what you'll find are the popular theories as to how an idiom originated, but it may or may not be necessarily so.
In addition, quotes containing a particular phrase are usually taken from old newspapers, poems, or books that were written centuries ago, but this does not mean that the phrase originates from said newspapers, poems, or books. In all likelihood, if an expression is being used in a newspaper, it's probably already a well known saying and is thus from an older time. With that said, old quotes give some indication on how old a saying is.
KnowYourPhrase.com - The Meanings and Possible Origins For Many Phrases and Sayings!
This phrase, for the most part, is seen in a poem called Hudibras. The first two parts of
the poem were written by poet Samuel Butler in the years 1663 and 1664:
"To swallow gudgeons ere th' are catch'd,
And count their chickens ere th' are hatch'd."
It is also said that Thomas Howell used the phrase in New Sonnets and Pretty Pamphlets, 1570:
"Counte not thy Chickens that vnhatched be,
Waye wordes as winde, till thou finde certaintee."
Additionally, a Greek fabulist named Aesop, said to have lived from 620 to 560 BCE, is also credited as using this expression. He has several written fables attributed to his name; today, these are collectively known as Aesop's Fables. One of them is titled The Milkmaid and Her Pail, and there's a line from the tale that reads:
"Ah, my child," said the mother, "Do not count your chickens before they are hatched."
* Louis was already planning his winning celebration before the race started, but he counted his chickens before they hatched as he ended up receiving last place.