Counting sheep is a custom that is part of popular culture and is theoretically used to sleep. This mental exercise consists of imagining a series of identical sheep in a field and numbering them as they jump over a fence. This simple, repetitive activity is supposed to help people fall asleep at night.

The popularizer Alfred López indicates that the origin of this tradition is somewhat uncertain, but points out that almost all the sources point to an old tale. It is a story written in Latin at the beginning of the 12th century by Pedro Alfonso de Huesca, within his work Disciplina clericalis. This collection of teaching tales compiles 33 stories from oral folklore, drawn from Christian, Arabic and Jewish sources.

One of them is that of a king who has a storyteller in his court, who every night invents several stories so that he can sleep. On one occasion when the monarch couldn’t get to sleep, the creator came up with a longer story. It is that of a man who bought 1,000 sheep in the market. To take them to his house, he had to cross a river and he could only ford it by taking them one at a time. Since there were so many animals, the king fell asleep before the end of the story.

The novel Don Quixote de la Mancha, by Miguel de Cervantes and published in 1605, includes a reference to the aforementioned story. The writer changed the sheep for goats, as can be seen in the lines of his famous work.

One of its chapters shows how a shepherd has to cross a river with 300 goats. The fisherman who can help him is only capable of taking one specimen on each trip, since his boat is very small. “Let his adoration count the goats that the fisherman is crossing, since if one escapes from memory there will be an end to the story and it will be impossible to tell another word”, says Sancho Panza in the book.

According to the criteria of The Trust Project