Bamidbar1:49

אַךְ אֶת־מַטֵּה לֵוִי לֹא תִפְקֹד וְאֶת־רֹאשָׁם לֹא תִשָּׂא בְּתוֹךְ בְּנֵי יִשְׂרָאֵל׃

"Only the tribe of Levi you shall not count, and you shall not take their total among the children of Israel.

Bamidbar 1:49

אַךְ אֶת־מַטֵּה לֵוִי

Bamidbar / Numbers 1:49 · Pshat

Bamidbar 1:49

אַךְ אֶת־מַטֵּה לֵוִי לֹא תִפְקֹד וְאֶת־רֹאשָׁם לֹא תִשָּׂא בְּתוֹךְ בְּנֵי יִשְׂרָאֵל׃

"Only the tribe of Levi you shall not count, and you shall not take their total among the children of Israel.

Pshat פְּשָׁט

The King's legion

A large army has a special unit: the commander's personal guard. It is not put in the general ranks and not counted with everyone else. Why is it set apart?

Rashi: the tribe of Levi is the King's legion, and it is fitting that it be counted on its own. And further: the Eternal saw that all those counted from twenty years were destined to die in the wilderness, and did not want the Levites, who did not err with the calf, to be among them. Sforno: the total of the tribe of Levi does not enter the general total of the tribes.

How Rashi and Sforno explain it

Rashi Only the tribe of Levi you shall not count

The king's legion is worthy of being counted on its own.

Another explanation: the Holy One, blessed is He, foresaw that a decree would come upon all those counted from twenty years old and up, to die in the wilderness. He said: "Let these not be among them, for they are Mine: they did not err with the calf."

Sforno And you shall not take their total

When you make the total of all those counted of the tribes, let the total of the tribe of Levi not enter it.

Takeaway

Legion (לִגְיוֹן) is a word from Latin, a large unit of the Roman army. The king's legion is his own personal army.
The decree came after the report of the spies: "In this wilderness your carcasses shall fall, all those of you counted, by your whole number, from twenty years old and up" (Bamidbar / Numbers 14:29).
When the people made the golden calf, Moshe (Moses) said: "Whoever is for the Eternal, to me!", and all the sons of Levi gathered to him (Shemot / Exodus 32:26).
The total of those counted of the tribes, without the Levites, is six hundred and three thousand five hundred and fifty (Bamidbar / Numbers 1:46).