In Medieval Britain, shepherds who wanted to use communal grazing land were required to keep a close head count of their flocks, using a special counting system (it went by the catchy name of “yan, tan, tethera,” and shepherds kept using it until the turn of the 20th century!) before they hit the hay each night. But at least one book claims the link between sheep and sleep goes back even further. A chapter in Disciplina Clericalis, a 12th-century book of fables, suggests that counting sheep had already been a cultural trope in Islamic culture for centuries. Origins aside, the practice is an awful sleeping aid. A 2002 Oxford study found that insomniacs who counted imaginary ewes actually took longer to nod off. Maybe that’s why Don Quixote preferred goats.