Bamidbar3:40

וַיֹּאמֶר יְהוָה אֶל־מֹשֶׁה פְּקֹד כָּל־בְּכֹר זָכָר לִבְנֵי יִשְׂרָאֵל מִבֶּן־חֹדֶשׁ וָמָעְלָה וְשָׂא אֵת מִסְפַּר שְׁמֹתָם׃

And the Eternal said to Moshe: "Count every firstborn male of the children of Israel from a month old and up, and take the number of their names.

Bamidbar 3:40

וַיֹּאמֶר יְהוָה אֶל־מֹשֶׁה

Bamidbar / Numbers 3:40 · Remez

Bamidbar 3:40

וַיֹּאמֶר יְהוָה אֶל־מֹשֶׁה פְּקֹד כָּל־בְּכֹר זָכָר לִבְנֵי יִשְׂרָאֵל מִבֶּן־חֹדֶשׁ וָמָעְלָה וְשָׂא אֵת מִסְפַּר שְׁמֹתָם׃

And the Eternal said to Moshe: "Count every firstborn male of the children of Israel from a month old and up, and take the number of their names.

Remez רֶמֶז

A lamb for a donkey

One and the same word can mean "count," "remember" and "take care." What if all these meanings sound in one command?

Midrash Tanchuma: the word "count" (פָּקַד) has many meanings. There is "counting" of the firstborn, "remembering" when children are given, "care" that guards, and "appointing" to peace. The Rosh: out of love for Israel the Eternal changed the order: in the Torah a donkey is redeemed with a lamb, and He redeemed a lamb with a donkey, Israel at the price of the firstborn of Egypt.

How Midrash Tanchuma (Buber) and Rosh explain it

Midrash Tanchuma (Buber) Another explanation: "Count every firstborn male."

There is "counting" (פְּקִידָה) of the firstborn, as it says: "Count every firstborn male." There is "remembering" for children: "For the Eternal remembered (פָקַד) Channah (Hannah), and she conceived and bore three sons" (Shmuel I / I Samuel 2:21). There is "care" for guarding: "And Your care (פְקֻדָּתְךָ) has guarded my spirit" (Iyov / Job 10:12). There is "appointing" for peace: "And I will make your officers (פְקֻדָּתֵךְ) peace" (Yeshayahu / Isaiah 60:17).

Rosh Count every firstborn male

The Holy One, blessed is He, said to Israel: "For the sake of your love I changed the order of the world. For I wrote: 'And the firstling of a donkey you shall redeem with a lamb' (Shemot / Exodus 34:20), but I redeemed a lamb with a donkey. The lamb is Israel, as it says: 'Israel is a scattered lamb' (Yirmeyahu / Jeremiah 50:17). The donkey is Egypt, as it says of them: 'whose flesh is the flesh of donkeys' (Yechezkel / Ezekiel 23:20). I killed the firstborn of Egypt and made holy to Me every firstborn in Israel."

Takeaway

The verb "count" (פָּקַד) in Tanakh means "number," "remember, visit," "take care" and "appoint." The midrash gathers four verses with one root: the letters pe (פ), kuf (ק) and dalet (ד).
The law of the firstling of a donkey: it is redeemed with a lamb (Shemot / Exodus 34:20, 13:13).
On the night of the exodus the Eternal struck the firstborn of Egypt and then made holy to Himself the firstborn of Israel (Bamidbar / Numbers 3:13).
The word "lamb" (שֶׂה) in the verse of the prophet Yirmeyahu (Jeremiah) means both "lamb" and "sheep."