A veterinary inspector visiting small farms is required to record how many birds and how many cattle each yard holds. On a wet Tuesday she reached a yard where the owner had gone to town, and the gate was locked.
She could see the animals through the railings but could not walk among them, and from where she stood the chickens and the cows kept moving behind one another. Counting each kind separately was hopeless. Two things, though, she could count exactly: a total of twenty animals, and — with the herd standing still in the mud — fifty-six legs between them.
Two counts, two kinds of animal. That is enough.
Suppose they were all chickens. Twenty birds would show forty legs, and she had counted fifty-six — sixteen legs more than the supposition allows. Every cow she puts back in place of a chicken adds exactly two legs to the yard, so sixteen extra legs mean eight cows. The other twelve animals are chickens.
She wrote «12 and 8» in the register, and checked it at the gate: twelve chickens and eight cows is twenty animals ✓, and twenty-four legs plus thirty-two legs is fifty-six ✓.
The farmer, when he came back, asked how she had managed it through a locked gate. «I counted twice,» she said, «and the second count asked a different question.»