(ב) דָּבָר אַחֵר, פְּקֹד כָּל בְּכֹר זָכָר וגו', הֲדָא הוּא דִּכְתִיב (שיר השירים ו, ח ט): שִׁשִּׁים הֵמָּה מְלָכוֹת וגו' אַחַת הִיא יוֹנָתִי תַמָּתִי וגו', מָשָׁל לְאָדָם שֶׁהָיָה לוֹ פְּרַגְמָטוֹטִין שֶׁל אֲבָנִים, שֶׁל זְכוּכִית, וְהָיָה מוֹצִיאָן לַשּׁוּק וְלֹא הָיָה מַבְחִין בַּמִּנְיָן, שֶׁלֹא הָיָה מוֹצִיאָן בְּמִנְיָן, וְנִכְנָס לְהַנִּיחָן וְלֹא הָיָה מַנִּיחָן בְּמִנְיָן, שֶׁלֹא הָיָה מַשְׁגִּיחַ עֲלֵיהֶם שֶׁהָיוּ שֶׁל זְכוּכִית, וְהָיָה לוֹ פְּרַגְמָטֵיס אַחַת שֶׁל מַרְגָּלִיּוֹת נָאוֹת וְהָיָה נוֹטְלָהּ וּמוֹצִיאָהּ בְּמִנְיָן וּמַנִּיחָהּ בְּמִנְיָן. כָּךְ כִּבְיָכוֹל אָמַר הַקָּדוֹשׁ בָּרוּךְ הוּא, לְאֻמּוֹת הָעוֹלָם לֹא נָתַתִּי מִנְיָן, לָמָּה, שֶׁאֵין חֲשׁוּבִין לְפָנַי כְּלוּם, שֶׁנֶּאֱמַר (ישעיה מ, יז): כָּל הַגּוֹיִם כְּאַיִן נֶגְדוֹ. אֲבָל אַתֶּם בָּנַי, שֶׁנֶּאֱמַר (שיר השירים מו, ג): הָעֲמֻסִים מִנִּי בֶטֶן וגו', לְכָךְ מוֹנֶה אֶתְכֶם בְּכָל שָׁעָה, לְכָךְ נֶאֱמַר: פְּקֹד כָּל בְּכֹר זָכָר, הֱוֵי: שִׁשִּׁים הֵמָּה מְלָכוֹת וגו' אַחַת הִיא יוֹנָתִי, אֵלּוּ יִשְׂרָאֵל.
(2) Another interpretation: "Number all the first-born males..." (Numbers 3:40) This is what is written (Song of Songs 6:8-9): "There are sixty queens ... [but] My dove, my undefiled, is just one ..." Compare to a parable: A person who had a bundle of glass stones and would bring them them to the market, but s/he would not notice their number, ... since s/he would not care about them, as they were glass. But s/he had one bundle of precious pearls, and s/he would take it and bring it out by number and put it away counting them. Similarly, so to speak, the Holy One Blessed be He said to Israel: You are My children, as it says, (Isaiah 46:3), 'that are borne [by Me] from the birth ...' Therefore, I count you all the time." Therefore, it is said "Number all the first-born males." That is: "There are sixty queens but My dove, my undefiled, is just one ..." - these are Israel.
(1) Take a census - because from this point on the Israelites were headed for the land of Israel, and all males over the age of 20 were enlisted in the army for war, because on the 20th of the second month the Torah speaks of the people leaving the region of Mount Sinai, the cloud having lifted off the Tabernacle and begun to move ahead of the people. (Compare Numbers 10:11). In that chapter, verse 29, Moses invited his father-in-law Yitro to accompany the people who were now “journeying” toward the promised land. God issued the command to count the people so that one could keep track of how many soldiers there were.
שאו את ראש כל עדת בני ישראל - ... ואפשר שיהיה הטעם בזה, בעבור שאינו חזק למלחמה בפחות מעשרים, וכמו שאמרו (אבות ה כא): בן עשרים לרדוף....
"Take the census" - ... A possible reason [for only counting men aged 20 and up] is that below age 20, one is not strong enough for battle, as it says (Mishnah Avot 5:21), "At age twenty one begins to pursue."
Akeidat Yitzhak, Numbers, #72
R. Isaac Arama (1420-1494) asks why all the seemingly dull details of the census are necessary. Did God not know the number of Israelites encamped in the desert in any case? Taking account of them one by one, R. Arama argues, serves to teach that each one has individual worth, and is not just a member of the collective. "They were all equal in stature," Arama writes, "and yet the stature of each one was different". (Courtesy of R. Shai Held)
Jacob Milgrom, JPS Torah Commentary (1991), Numbers 31:48-52, Excursus 2
The basis for the taboo against a census is not known, although one plausible suggestion has been offered: As the shepherd counts his sheep, so the counter of persons must be their owner, a title belonging solely to God and not to man.
R. Menachem Mendel Morgenstern of Kotzk, known as the Kotzker Rebbe
“Give me ten emesdike yiddin, and I will change the world."