Bamidbar3:16

וַיִּפְקֹד אֹתָם מֹשֶׁה עַל־פִּי יְהוָה כַּאֲשֶׁר צֻוָּה׃

And Moshe counted them by the word of the Eternal, as he had been commanded.

Bamidbar 3:16

וַיִּפְקֹד אֹתָם מֹשֶׁה

Bamidbar / Numbers 3:16 · Pshat

Bamidbar 3:16

וַיִּפְקֹד אֹתָם מֹשֶׁה עַל־פִּי יְהוָה כַּאֲשֶׁר צֻוָּה׃

And Moshe counted them by the word of the Eternal, as he had been commanded.

Pshat פְּשָׁט

A voice from the tent

You are given a task that seems impossible: enter every home and count the infants. Where would you begin?

Rashi: Moshe (Moses) asked how he could enter every tent to count the infants. The Eternal answered: "You do yours, and I will do Mine." Moshe stood at the entrance, and a voice from heaven said how many infants were inside. Netziv: the spirit of holiness that was on Moshe when he was given the command was on him during the count too, and he knew what was inside each tent.

How Rashi and Haamek Davar explain it

Rashi By the word of the Eternal

Moshe said before the Holy One, blessed is He: "How shall I enter all their homes and their tents to know the number of their nursing infants?" The Holy One, blessed is He, said to him: "You do yours, and I will do Mine." Moshe went and stood at the entrance of the tent, and the Presence (שְׁכִינָה) went before him, and a voice from heaven came out of the tent and said: "So many infants are in this tent." That is why it says: "By the word of the Eternal."

Haamek Davar As he had been commanded

This means: just as at the hour of the command the spirit of holiness rested on Moshe in abundance, so at the hour of the count it was "by the word of the Eternal." With that same abundance he went from tent to tent and knew what was inside. And this is included in the Eternal's speech itself.

Takeaway

A voice from heaven (בַּת קוֹל, literally "daughter of a voice") is what the sages call a word from above that a person hears without a prophet.
The Levites are counted "from a month old and up" (Bamidbar / Numbers 3:15), so nursing infants are included in the count.
The spirit of holiness (רוּחַ הַקֹּדֶשׁ) is a level at which what is hidden from the eyes is open to a person.