What's the meaning of the phrase 'Counting sheep'?
Counting sheep is a distraction technique used to help people get to sleep.
The mental distraction of imagining a field of sheep and counting them is intended to distract insomniacs from fretting about being awake and relax into sleep.
What's the origin of the phrase 'Counting sheep'?
Insomnia has probably always been with us, likewise sheep. The counting sheep technique, like other distraction exercises, is effective for some people who find it difficult to get to sleep.
We have evidence of this particular technique, of counting sheep as they are imagined in a field or jumping a fence, being used from at least 1854. That's from Seba Smith's Way down East; or Portraitures of Yankee life:
"He shut his eyes with all his might, and tried to think of sheep jumping over a wall."