Count their Half-Shekels to Prevent a Plague
One of the most enigmatic discussions in the Torah involves counting of the Jewish people. In this week’s parsha Moses is told by G‑d:
"When you take the census of the children of Israel each man shall give an atonement for himself to G‑d so that the census does not lead to a plague. This shall they give, everyone who passes through the census , a half shekel…”
Rather than count the people directly, the census would be taken by counting their half shekels.
The rationale for this roundabout way of counting was to avert a plague.
What is the logic behind this?
Commentators explain that when we are together as one people we are not vulnerable because, as the saying goes, “in unity there is strength.” The collective body of Jewish souls forms an impregnable wall that protects the people. When they are counted we the focus is on their each person’s individuality, and as individuals we are vulnerable and more susceptible to G‑d’s scrutiny and judgment.
The plague the Torah speaks of is not a punishment for counting, it is merely a reflection of each person’s vulnerability.
King David’s Census
Thus, our Sages tell us that when King David counted the people he exposed them to great danger and as a result thousands of people perished (II Samuel 24).
The conventional wisdom is that King David forgot the law that prohibits counting the people directly.
This raises a powerful question. How could a man as great as King David, as faithful to the most minute details of the Torah which he loved so passionately, the man G‑d referred to as His servant,  forget such a consequential law to not to count Jews directly?
In truth, Nachmanides (Bamidbar 1:3) and the Radak explain that King David certainly did not violate a clear Biblical command against counting Jews directly. Indeed, his predecessor, King Saul counted the Jews by counting their sheep (I Samuel 15:4). Why then would King David deviate from the law and from the precedents set by his predecessors?
We must conclude that King David did, in fact, follow the rule and that he did count them by collecting a sum of atonement. Why then was it considered such a sin for him to have counted the Jews that it resulted in the terrible plague? The answer is that King David was faulted for counting them unnecessarily.
This premise begs the obvious question: If the Torah permitted counting and even requested it in the days of Moses, and then it was repeated by King Saul without mishap, why was it wrong for King David to conduct the census if he did it the right way, by counting coins?
Another question: According to the Midrash, the Jewish people were punished by the plague because they failed to demand the building of the Bais Hamikdash-the Holy Temple in Jerusalem.  Prior to its construction a generation later by King Solomon, the Temple was housed in a temporary structure in a temporary location, the city of Givon. The ark, the most important part of the Mishkan, the portable Sanctuary in the desert, was not in the temporary Temple in Givon, so the status of the Temple was tentative. The people were faulted because while they had stable and permanent dwelling places, G‑d had no permanent and settled location, as it were.
How do we reconcile these two versions concerning the sin that resulted in the plague? Was it because King David counted them needlessly or was it because they did not demand ! [yes, the Midrash uses the term demand as in the case of an employee who respectfully demands payment for his services] the construction of the Bais Hamikdash?
The short answer is that these two reasons for the plague are complementary.  They are two expressions of the same problem.
Two Levels of Peoplehood
To understand this we must preface with a discussion of Jewish peoplehood, which manifests itself on two levels:
On the one hand we are a single and indivisible entity. That is our most essential state. And while it is rarely seen in real life because of our so many external and overt differences, it represents our essential and underlying nature. This intrinsic unity came to the fore when we approached Mount Sinai and we encamped, as “one person with one heart.” Throughout history there have been times when the Jewish people demonstrated such unity as, for example, during the Six Day War. This unity reflects our true state.
On the other hand, the Torah was given to each individual as an individual. If one Jew would have been missing at Sinai, our Sages tell us, the Torah would not have been given to anyone. In Judaism there is a great emphasis on the infinite value of each individual. G‑d looks at each Jew and views him or her as if he or she were His only child.
So G‑d looks at us in two ways; collectively and individually.
We too must reciprocate our connection to G‑d in two parallel ways. We must see ourselves as part of a unified whole, in ways that transcend our own individual status and interests. We must surrender our individuality to a higher plane by coalescing into this indivisible collective, known as the Jewish people.
However, for us to surrender our individuality it is imperative that we cultivate an individual identity. Furthermore, there are times when we must focus on our own spiritual and material well-being, searching for ways to grow and distinguish ourselves thereby demonstrating that G‑d views each individual as unique. No two people are truly identical. As the Talmud puts it: “Just as there are no two people who look alike, there are no two people who think alike.” The differences in our appearances, thought processes, and indeed our very souls, were programmed into our existence by our Creator. G‑d does not create redundancy. Each individual has a specific and unparalleled power, mission and destiny.
There are times when it is crucial that we accentuate our individuality, without losing sight of our collective and unified state. Conversely, there are times when we must focus on our collective identities without losing sight of our individuality. The difference is in focus and emphasis.
Difference Between the Sinai Era and King David’s Era
When the Jewish people received the Torah at Mount Sinai their collective nature was most prominent. So when they were ready to build a Sanctuary for G‑d, they were asked to contribute as individuals to shore up their potential as individuals. Some brought gold and some brought silver, etc. It was important that their relationship with G‑d allow their individuality to be present and to flourish.
To underscore the role of the individual they had to be counted. When you count things you focus on their separateness. However, to forestall the people from gravitating to the extreme and losing sight of their inherent unity, they were told to donate a Half-Shekel (as opposed to one whole shekel), which indicates that we are incomplete all by ourselves.
However, in the days of King David, the mission was to bring solidarity to the nation. Prior to the monarchy, each tribe governed itself. The Book of Judges describes that period as one of anarchy; there was no central government, institution, or leader to unify the people into one body. To restore stability, it was crucial to construct the Bais Hamikdash. Only thus would the Unity of G‑d dwell in the Land in a way that would instill oneness in the people as well.
Hence by counting the people, King David was actually accentuating their individuality at a time when it was more necessary to emphasize their unity. 
Had the people demanded the construction of the Bais Hamikdash, which is the ultimate unifying force, this would have compensated for King David’s counting and would have prevented the plague.
Thus, the two reasons given for the plague are essentially one. Both King David and the people of Israel failed to appreciate the immediate need to surrender the ideal of individuality for the sake of establishing absolute unity in Israel.
Messianic Age: Fusion of the Collective and the Individual
We are living on the cusp of the Messianic Age. As the Rebbe told us, we are ready and waiting for Moshiach to receive the order from on High to build the Third Bais Hamikdash. Maimonides states that the building of the Beis HaMikdash will be followed by the ingathering of all the Jewish people to the Land of Israel. This ingathering is described by the prophet (Isaiah 27:12) as G‑d gathering each and every person individually; taking each by their hand and returning him to the Land of Israel (See Rashi, Devarim 29:3).
What is unique about our situation now is that we must focus our attention on both the collective and the individual simultaneously. The collective focus is achieved by praying for the construction of the third Bais Hamikdash even as we create a Sanctuary in our own hearts. At the same time, we must also dwell on achieving spiritual growth as individuals, seeking to realize our own unique G‑d given potential. The Messianic Age will be an enhanced repetition of the Revelation at Sinai, which revealed our inherent unity even as G‑d would not allow even one Jew to be missing. We have to alternate between powerful self-development and growth and then surrender our individuality to the collective unity of the Jewish people.