The Torah tells us to count forty-nine days from Pesach to Shavu’os. But the Torah doesn’t actually connect this count either to Pesach or to Shavu’os. It says we count from the bringing of the Korban Ha’omer, which takes place on the second day of Pesach, until the bringing of a new grain offering, minchah chadashah, which takes place on Shavu’os.
So the Torah doesn’t actually tell us the reason for Sefiras Ha’omer. It doesn’t tell us why we should make this count. We do generally know something about the reason for the mitzvos we do. For instance, we know that Shofar brings up our remembrance before Hashem. We know that Sukkah represents the Ananei Hakavod in which Hashem housed us when we left Egypt. But what about Sefiras Ha’omer?
Sefer Hachinuch writes that the main reason we were redeemed from Egypt was to receive the Torah and fulfill it. Consequently, the goodness we attained when we left Egypt came to fruition when we received the Torah at Har Sinai. We therefore have a mitzvah to count the days from Pesach to the day of Kabbalas Hatorah. We thereby show how much we long for this glorious day.
This is surely a wonderful explanation, but it doesn’t even state in the Torah that Shavu’os is the time when we received the Torah. And it doesn’t say that the counting we do is a preparation for Torah. The pasuk speaking of Sefiras Ha’omer talks about counting the days between the offering of the Omer, which was from barley, to the new grain offering of wheat.