(א) וַיְדַבֵּ֥ר ה' אֶל־מֹשֶׁ֥ה לֵּאמֹֽר׃ ... (ד) אֵ֚לֶּה מוֹעֲדֵ֣י ה' מִקְרָאֵ֖י קֹ֑דֶשׁ אֲשֶׁר־תִּקְרְא֥וּ אֹתָ֖ם בְּמוֹעֲדָֽם׃ (ה) בַּחֹ֣דֶשׁ הָרִאשׁ֗וֹן בְּאַרְבָּעָ֥ה עָשָׂ֛ר לַחֹ֖דֶשׁ בֵּ֣ין הָעַרְבָּ֑יִם פֶּ֖סַח לַה' ... (ט) וַיְדַבֵּ֥ר ה' אֶל־מֹשֶׁ֥ה לֵּאמֹֽר׃ (י) דַּבֵּ֞ר אֶל־בְּנֵ֤י יִשְׂרָאֵל֙ וְאָמַרְתָּ֣ אֲלֵהֶ֔ם כִּֽי־תָבֹ֣אוּ אֶל־הָאָ֗רֶץ אֲשֶׁ֤ר אֲנִי֙ נֹתֵ֣ן לָכֶ֔ם וּקְצַרְתֶּ֖ם אֶת־קְצִירָ֑הּ וַהֲבֵאתֶ֥ם אֶת־עֹ֛מֶר רֵאשִׁ֥ית קְצִירְכֶ֖ם אֶל־הַכֹּהֵֽן׃ (יא) וְהֵנִ֧יף אֶת־הָעֹ֛מֶר לִפְנֵ֥י ה' לִֽרְצֹנְכֶ֑ם מִֽמָּחֳרַת֙ הַשַּׁבָּ֔ת יְנִיפֶ֖נּוּ הַכֹּהֵֽן׃... (טו) וּסְפַרְתֶּ֤ם לָכֶם֙ מִמָּחֳרַ֣ת הַשַּׁבָּ֔ת מִיּוֹם֙ הֲבִ֣יאֲכֶ֔ם אֶת־עֹ֖מֶר הַתְּנוּפָ֑ה שֶׁ֥בַע שַׁבָּת֖וֹת תְּמִימֹ֥ת תִּהְיֶֽינָה׃ (טז) עַ֣ד מִֽמָּחֳרַ֤ת הַשַּׁבָּת֙ הַשְּׁבִיעִ֔ת תִּסְפְּר֖וּ חֲמִשִּׁ֣ים י֑וֹם וְהִקְרַבְתֶּ֛ם מִנְחָ֥ה חֲדָשָׁ֖ה לַה' (כא) וּקְרָאתֶ֞ם בְּעֶ֣צֶם ׀ הַיּ֣וֹם הַזֶּ֗ה מִֽקְרָא־קֹ֙דֶשׁ֙ יִהְיֶ֣ה לָכֶ֔ם כָּל־מְלֶ֥אכֶת עֲבֹדָ֖ה לֹ֣א תַעֲשׂ֑וּ חֻקַּ֥ת עוֹלָ֛ם בְּכָל־מוֹשְׁבֹ֥תֵיכֶ֖ם לְדֹרֹֽתֵיכֶֽם׃ (כב) וּֽבְקֻצְרְכֶ֞ם אֶת־קְצִ֣יר אַרְצְכֶ֗ם לֹֽא־תְכַלֶּ֞ה פְּאַ֤ת שָֽׂדְךָ֙ בְּקֻצְרֶ֔ךָ וְלֶ֥קֶט קְצִירְךָ֖ לֹ֣א תְלַקֵּ֑ט לֶֽעָנִ֤י וְלַגֵּר֙ תַּעֲזֹ֣ב אֹתָ֔ם אֲנִ֖י ה' אֱלֹהֵיכֶֽם׃ (ס)
(1) And the ETERNAL spoke unto Moses, saying:... (4) These are the appointed seasons of the ETERNAL, even holy convocations, which ye shall proclaim in their appointed season. (5) In the first month, on the fourteenth day of the month at dusk, is the ETERNAL’S passover. ...(9) And the ETERNAL spoke unto Moses saying: (10) Speak unto the children of Israel, and say unto them: When ye are come into the land which I give unto you, and shall reap the harvest thereof, then ye shall bring the Omer of the first-fruits of your harvest unto the priest. (11) And he shall wave the Omer before the ETERNAL, to be accepted for you; on the morrow after the sabbath the priest shall wave it. ...(15) And ye shall count unto you from the morrow after the day of rest, from the day that ye brought the Omer of the waving; seven weeks shall there be complete; (16) even unto the morrow after the seventh week shall ye number fifty days; and ye shall present a new meal-offering unto the ETERNAL....(21) And ye shall make proclamation on the selfsame day; there shall be a holy convocation unto you; ye shall do no manner of servile work; it is a statute for ever in all your dwellings throughout your generations. (22) And when ye reap the harvest of your land, thou shalt not wholly reap the corner of thy field, neither shalt thou gather the gleaning of thy harvest; thou shalt leave them for the poor, and for the stranger: I am the ETERNAL your God.
(ט) שִׁבְעָ֥ה שָׁבֻעֹ֖ת תִּסְפָּר־לָ֑ךְ מֵהָחֵ֤ל חֶרְמֵשׁ֙ בַּקָּמָ֔ה תָּחֵ֣ל לִסְפֹּ֔ר שִׁבְעָ֖ה שָׁבֻעֽוֹת׃ (י) וְעָשִׂ֜יתָ חַ֤ג שָׁבֻעוֹת֙ לַה' אֱלֹהֶ֔יךָ מִסַּ֛ת נִדְבַ֥ת יָדְךָ֖ אֲשֶׁ֣ר תִּתֵּ֑ן כַּאֲשֶׁ֥ר יְבָרֶכְךָ֖ ה' אֱלֹהֶֽיךָ׃
(9) Seven weeks shalt thou number unto thee; from the time the sickle is first put to the standing corn shalt thou begin to number seven weeks. (10) And thou shalt keep the feast of weeks unto the ETERNAL thy God after the measure of the freewill-offering of thy hand, which thou shalt give, according as the ETERNAL thy God blesseth thee.
(א) נוֹהֲגִים שֶׁלֹּא לִשָּׂא אִשָּׁה בֵּין פֶּסַח לַעֲצֶרֶת עַד ל''ג לָעֹמֶר, מִפְּנֵי שֶׁבְּאוֹתוֹ זְמַן מֵתוּ תַּלְמִידֵי רַבִּי עֲקִיבָא; אֲבָל לְאָרֵס וּלְקַדֵּשׁ, שַׁפִּיר דָּמִי, וְנִשּׂוּאִין נָמֵי, מִי שֶׁקָּפַץ וְכָנַס אֵין עוֹנְשִׁין אוֹתוֹ. הַגָּה: מִיהוּ מִלַּ''ג בָּעֹמֶר וָאֵילָךְ הַכֹּל שָׁרֵי (אַבּוּדַרְהַם וּבֵית יוֹסֵף וּמִנְהָגִים).
(ב) נוֹהֲגִים שֶׁלֹּא לְהִסְתַּפֵּר עַד ל''ג לָעֹמֶר, שֶׁאוֹמְרִים שֶׁאָז פָּסְקוּ מִלָּמוּת, וְאֵין לְהִסְתַּפֵּר עַד יוֹם ל''ד בַּבֹּקֶר אֶלָּא אִם כֵּן חָל יוֹם ל''ג עֶרֶב שַׁבָּת שֶׁאָז מִסְתַּפְּרִין בּוֹ מִפְּנֵי כְּבוֹד הַשַּׁבָּת. הַגָּה: וּבִמְדִינוֹת אֵלּוּ אֵין נוֹהֲגִין כִּדְבָרָיו, אֶלָּא מִסְתַּפְּרִין בְּיוֹם ל''ג וּמַרְבִּים בּוֹ קְצָת שִׂמְחָה וְאֵין אוֹמְרִים בּוֹ תַּחֲנוּן (מַהֲרִי''ל וּמִנְהָגִים). וְאֵין לְהִסְתַּפֵּר עַד ל''ג בְּעַצְמוֹ וְלֹא מִבָּעֶרֶב (מַהֲרִי''ל). מִיהוּ אִם חָל בְּיוֹם רִאשׁוֹן, נוֹהֲגִין לְהִסְתַּפֵּר בְּיוֹם ו' לִכְבוֹד שַׁבָּת (מַהֲרִי''וּ). מִי שֶׁהוּא בַּעַל בְּרִית אוֹ מָל בְּנוֹ, מֻתָּר לְהִסְתַּפֵּר בַּסְּפִירָה לִכְבוֹד הַמִּילָה. (הַגָּהוֹת מִנְהָגִים).
(1) It is customary not to get married between Pesach and Shavuot, until Lag BaOmer (the 33rd day), because during that time, the students of Rabbi Akiva died. However, to do "erusin" and "kiddushin" (engagement and betrothal) is OK. And even for "nisuin" (marriage), if someone did so, we do not punish him. Rema: however, from Lag Ba'Omer onwards, all this is permitted (Abudraham, Beit Yosef & Minhagim).
(2) It is customary not to cut one's hair until Lag BaOmer, since it is said that that is when they stopped dying. One should not cut one's hair until the 34th day, in the morning, unless the 33rd day falls on Friday, in which case one may cut one's hair then, in honor of the Sabbath ("kavod Shabbat"). Rema: But in these countries, we do not follow the custom he advocates; rather, we cut our hair on the 33rd day, and we rejoice a bit, and we do not say Tachanun (Maharil and Minhagim). And one should only cut one's hair on the 33rd day itself, but not on its evening. However, if it falls on Sunday, our custom is to cut our hair on Friday in honor of the Sabbath (Maharil). Someone who is performing a brit milah (i.e., the sandak, mohel and the infant's father), or circumcizing his son, is allowed to cut his hair during sefirah in honor of the circumcision (Hagahot Minhagim).
Sefer haChinuch, Mitzvah #306
Since the acceptance of the Torah was the goal of our redemption and serves as the foundation of the Jewish people, and through it we achieved our greatness, we were commanded to count from the day after [the first day of] Pesach until the day that the Torah was given. This manifests our great desire for that awesome day which our hearts yearn for just as a servant yearns for shade. We count constantly - when will the day come that we yearn for, the day that we left slavery? Because of counting [towards a certain date] shows a person that all his desire and longing is to reach that time.
Rambam, Moreh Nevuchim 3:43
Shavuot is the time of the Giving of the Torah. In order to honor and elevate this day we count the days from the previous festival until it [arrives], like someone who is waiting for a loved one to arrive, who counts the days by the hours. This is the reason for counting the Omer from that day that we left Egypt until the day of the Giving of the Torah, as this was the ultimate purpose of leaving Egypt: "And I will bring them to Me" (Ex. 19:4)