Though today, according to most authorities, the mitzvah of Sefirat HaOmer is considered a Rabbinic mitzvah, enacted as a remembrance of the Temple, during Temple times it was a Biblical commandment to count forty-nine days (seven full weeks) from the eve of the second day of Pesach (the sixteenth of Nissan) until the holiday of Shavuot (literally “weeks”).
Today’s Sefirah is also connected with the Exodus from Egypt. The Midrash relates that when the Jewish People left Egypt Moshe told them that they would serve
Some explain that although every Jewish person stood at Mount Sinai when the Torah was given, each year on Shavuot we receive the Torah anew. This idea can be understood by looking at time as a circular spiral that ascends. As one follows the circle of the spiral, each time he returns to the same point he will again be directly above the place he stood before. So too, each year as we return to the day of Shavuot, we are standing in a “different but same” place relative to where we stood the year before. The Kabbalists make this point in connection to prayer. They explain that no two prayers are ever the same, and even if they correspond to the same time or day they are different because no two days are the same.
Why do we keep customs of mourning during Sefirah?
During the days of Sefirah it is Jewish custom to refrain from haircuts and shaving, weddings, and listening to music (for the details of these laws consult a local Orthodox rabbi). These customs are practiced because during the days of Sefirah 24,000 students of Rabbi Akiva died.
On a basic level the connection between keeping some customs of mourning and this period of time called “Sefira” is simply because it is the time on the calendar when this great tragedy occurred. But in a deeper sense the Kabbalah reveals that the days of counting the Omer are days of harsh Divine judgment. This is somewhat similar to the concept of counting people in general, which arouses the Divine attribute of judgment. We are taught that the spiritual soul-root of Rabbi Akiva’s students also corresponded to the attribute of judgment. All of this, together with the fact that they were on an exalted spiritual level and failed to accord each other the proper respect that was expected of them, resulted in the decree that they should die during the days of Sefirat HaOmer.