The king's order to conduct a census across the length and breadth of the land raises fundamental questions about the nature of counting people and the spiritual dangers involved. The command was directed to the army commander to travel back and forth throughout the territory to carry out a comprehensive military and civilian registration [מצודת ציון, ביאור שטיינזלץ]. Because the instruction was given in the plural, it is clear that the mission was assigned to Joab along with the military captains and soldiers who accompanied him [מצודת דוד, אברבנאל, ביאור שטיינזלץ].
The goal was not merely to discover the total population of the kingdom. Instead, David sought a highly detailed and personal registration, counting the people head by head [אברבנאל]. He wanted to record every soldier in the royal chronicles to ensure no one would be absent during a war. Furthermore, he planned to count the children and youth under the age of twenty to determine exactly when they would become eligible for military service [מלבי״ם].
This specific method of counting directly led to a devastating plague, raising a difficult question. The Torah explicitly warns that a ransom of a half-shekel must be given during a census to prevent a plague. It seems unusual that David and the wise men of his generation would overlook such a clear command. One perspective suggests that David believed the Torah's warning was only applicable to its original context, during the sin of the Golden Calf, when there was already strict judgment against the Israelites. He assumed that in ordinary times, counting posed no danger, an idea seemingly supported by King Saul's earlier census, which required no ransom and resulted in no plague [חומת אנך].
However, another approach draws a sharp distinction between the two events based on how the counting was done. Saul only counted the people to find out their total number, an action considered safe. David's critical error was counting the people individually, one by one, and including those under twenty. This kind of detailed, individual counting separates people from the protective merit of the community. It removes the blessing that naturally rests on things that are left uncounted and leaves the individuals vulnerable to the evil eye and disease. Because David chose to conduct such a specific, individualized census, the requirement to collect the ransom was absolute [מלבי״ם].