Jews have an aversion to counting people. Walk into a winter mincha minyan and Jews use ten-word verses to verify the minyan. To the minyanaire, no sweeter word than haolam, the final word in the classic Hoshia es Amecha [Tehillim, 28:9] verse can be heard.
Why not just count straight?
First, a famous Torah verse apparently indicates that bad things happen when counting people directly: [Shemos, 30:12]
"When you take the count of the B'nei Yisrael to determine their numbers, each man shall give an atonement pledge for his soul to Ad-noy, when you count them. Thus there will be no plague among them when you count them1.
R. Eleazar said: Whosoever counts Israel, transgresses a [biblical] prohibition, as it is said: "Yet the number of the children of Israel shall be as the sand of the sea, which cannot be measured" [Hoshea]. R. Nahman b. Isaac said: He would transgress two prohibitions, for it is written: 'Which cannot be measured nor numbered'.
Because they (the Israelites) are precious before Him (Hashem), He counts them all the time; when they went out of Egypt He counted them [Shemos, 12:37], and when they fell because of [the sin of] the golden calf He counted them to know the number of those who remained, when He came to cause His Presence to rest upon them He counted them.
And the king said to Joab .. "Go please, to and fro throughout all the tribes of Israel, from Dan as far as Beer-sheba and take census of the people, so that I may know the number of the people." And Joab said .. "May the Lord your God add to the people a hundredfold of whatsoever they may be, and the eyes of my lord, the king may see it; but my lord the king, why does he desire such a thing?" But the word of the king prevailed against Joab, ... 9. And Joab presented the sum .. And Israel consisted of eight hundred thousand valiant men that drew the sword; and the men of Judah were five hundred thousand men. ... 10. And David's heart smote him after he had counted the people. And David said to the Lord: I have sinned greatly in what I have done; and now, 'O Lord, put aside please, the iniquity of your servant, for I was very foolish! ..
'So says the Lord, "Three things I offer you, choose for yourself one of them, and I shall do it to you". And Gad came to David and he told him, and he said to him, "[Do you prefer] that seven years of famine in your land shall come upon you? or three months that you shall flee before your oppressor while he pursues you? or, that there be three days pestilence in your land? .. and David said to Gad; "I am greatly oppressed; let us fall now into the hand of the Lord; for His mercies are great; but into the hand of man let me not fall." So the Lord sent a pestilence upon Israel from the morning until the appointed time; And there died of the people from Dan to Beer-sheba seventy thousand men.
How could David have violated such an obvious imperative? Even if he did, why should the rest of the nations suffer?
Five minutes left in the exam, and the proctor calls out, "Finish up, people." Everyone starts writing conclusions, one guy keeps writing. The proctor calls out, "Time's up. All papers in." Everyone who hasn't finished brings up their papers. One guy just keeps writing. The proctor sees him, says, "I said 'Time's up.' Get your paper in now, or I'll have to disqualify your exam." The guy keeps writing. The proctor gathers all the exams into a big pile, looks at the guy writing, says, "That's it, then. Your exam is disqualified." The guy finishes up, checks the paper, carries it up to the front. The proctor shakes his head and says, "Sorry. I told you -- I won't accept your exam." The guy looks indignant, stares at the proctor, says "Do you realize who I am?" The proctor looks surprised, then annoyed, and says, "I don't know, and I don't care." The guy says, "I didn't think so," stuffs his paper into the very middle of the huge stack of exams, and runs out of the room.
R. Jonathan raised an objection: It is written: 'Yet the number of the children of Israel shall be as the sand of the sea,' and it is also written: 'Which cannot be numbered? This is no contradiction: Here it speaks of the time when Israel fulfils the will of the Lord, there of the time when they do not fulfill His will. Rabbi, on behalf of Abba Jose son of Dosthai, said: This is no contradiction: Here it speaks of [counting done] by human beings, there of counting by Heaven.
a. He thought the obligation to count indirectly was a temporal obligation. [Ramban]
b. He planned on bringing the coins afterwards [Levush].
a. That too is prohibited [Ramban, Midrash] / ii. David neglected to use coins [Ohr HaChaim].
1
Cf. Rashi for things that are counted are subject to the evil eye and as a result a plague befalls them like in the days of David.
2
Why did the Talmud not use the Biblical verse ? Cf Maharsha Yoma 22b who answers that perhaps the verse is referring to the Golden Calf and is not a general prohibition. This is also an approach to understand King David's countiong of the Jewish people.
3
L'havdil, but in a strikingly similar vein, the family patriarch might count his 5 children and 25 grandchildren . He is the chain that links.