וידבר… במדבר סיני … באחד לחדש וגו׳ AND [THE LORD] SPOKE [UNTO MOSES] IN THE DESERT OF SINAI … ON THE FIRST DAY OF THE [SECOND] MONTH … [TAKE YE THE SUM OF ALL THE CONGREGATION] etc. — Because they were dear to him, He counts them every now and then: when they went forth from Egypt He counted them (Exodus 12:37), when many of them fell in consequence of their having worshipped the golden calf He counted them to ascertain the number of those left (cf. Rashi Exodus 30:16); when he was about to make His Shechinah dwell amongst them (i. e. when He commanded them to make a Tabernacle), He again took their census; for on the first day of Nisan the Tabernacle was erected (Exodus 40:2) and shortly afterwards, on the first day of Iyar, He counted them.
לבית אבתם BY THE HOUSE OF THEIR FATHERS — One whose father belongs to one tribe and his mother to another tribe shall take his stand with the tribe of his father (cf. Bava Batra 109b).
אך את מטה לוי לא תפקד ONLY THOU SHALT NOT NUMBER THE TRIBE OF LEVI — The legion of the King is worthy to be numbered by itself (cf. Midrash Tanchuma, Bamidbar 15). — Another explanation is: The Holy One, blessed be He, foresaw that a decree would once be made against all those that had been numbered from twenty years and upwards, viz., that they should die in the wilderness (Numbers 14:29). He therefore said: Let these (the Levites) not be included amongst those now counted, in which case they must die, because they are Mine, since they did not sin by worshipping the golden calf (cf. Numbers Rabbah 3:7; Bava Batra 121b).
יומת SHALL BE PUT TO DEATH by heaven (not by sentence of the court) (cf. Sanhedrin 84a).
ואלה תולדת אהרן ומשה AND THESE ARE THE OFFSPRING OF AARON AND MOSES — But it mentions only the sons of Aaron! But they also are called the sons of Moses because he taught them the Torah. This tells us that whoever teaches the Torah to the son of his fellow man Scripture regards it to him as though he had begotten him (Sanhedrin 19b).
על פי יהוה [AND MOSES NUMBERED THEM] ACCORDING TO THE WORD OF THE LORD — Moses said to the Holy One, blessed be He, “How can I enter their tents to ascertain the number of their babes?!” Thereupon the Holy One, blessed be He, replied to him, “You do your share and I will do Mine!’ Moses accordingly went and stationed himself at the entrance of each tent, the Shechinah having gone there beforehand, and a divine voice issued from the tent, saying, “So-and-so many babes are in this tent”. It is on this account that it states, “[and Moses numbered them] according to the word (by the mouth) of the Lord” (Numbers Rabbah 3 9).
משפחת בני קהת יוחנו … תימנה THE FAMILY OF THE SONS OF KOHATH SHALL ENCAMP … SOUTHWARD — and next to them was the division of Reuben who, too, were encamped in the South (cf. Numbers 2:10) — “Woe to the wicked, woe to his neighbour!” It was on this account (on account of the friendship caused by this proximity) that some of them (the Reubenites) — Dathan and Abiram and 250 men (who were also mostly Reubenites, cf. Rashi on Numbers 16:1) — were punished together with Korah and his congregation, (cf. Numbers 16:32 ff.), because they were dragged into the quarrel with them (cf. Midrash Tanchuma, Vayera 12).