Find the word definition

Wiktionary
count sheep

vb. (context idiomatic English) To attempt to go to sleep by thinking of something boring, traditionally by counting imaginary sheep.

Usage examples of "count sheep".

Impractical, yet for lack of anything better to do I counted beats the way an insomniac might count sheep.

If this job were ever finished, I wanted to hire out to count sheep for a rich insomniac or, something equally soft.