“The L-rd spoke to Moses, saying: ‘When you take the sum of the children of Israel according to their numbers, let each one give to the L-rd an atonement for his soul when they are counted; then there will be no plague among them when they are counted.’” (Ex. 30:11-12)
The command is clear. The Jewish people are not to be counted directly. Every person gives a certain amount and in that way we’ll know how many there are.
The Torah also attaches a severe warning to the command: If the people will be counted without using indirect means — immediately there will be a plague! “Then there will be no plague among them when they are counted.”
Let’s think about this. Is any human capable of making such a commitment when it is clear in advance that he has no way of fulfilling it? Why would he put himself in such a situation?! And here, this commitment was undertaken for all ages!
Unfortunately, this prophetic promise did materialize:
“And the king said to Joab the captain of the host that was with him, “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 to the king… But the word of the king prevailed against Joab, and against the captains of the military. And Joab and the captains of the military went out from the presence of the king, to number the people, the Israelites. And they crossed the Jordan… And Joab presented the sum of the number of the people to the king; And Israel consisted of eight hundred thousand valiant men that drew the sword; and the men of Judah… So the L-rd 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. And the angel stretched out his hand toward Jerusalem to destroy it, and the L-rd regretted the evil, and he said to the angel that destroyed the people, “It is enough; now stay your hand.” And the angel of the L-rd was by the threshing-floor of Aravnah the Jebusite. And David said to the L-rd when he saw the angel that smote the people, “Behold I have sinned, and have acted iniquitously; but these sheep, what have they done? I beg that Your hand be against me, and against my father's house.” (Samuel II 24:2-17(