On the night after the Passover Seder, the second night of Passover (the 16th of Nisan), Jews begin to perform the commandment of counting the seven complete weeks of the Omer which culminates in the pilgrimage festival of Shavuot on the 50th day. This commandment is given explicitly in the Torah:
The Omer, a biblical measurement of approximately 43 ounces, refers to the wave offering of barley that was brought to the Temple along with a sacrifice of a lamb. This was harvested, prepared, and offered in the Temple on that day. The Torah commands us to count 50 days from the day we brought the Omer, and on the 50th day, another grain offering was brought. This counting between these two offerings is known as the Sefirat HaOmer, “Counting of the Omer.”
According to Jewish tradition, these 49 days mark the time between leaving Egypt and receiving the Torah at Mount Sinai.
The count is ideally done as soon as the sun goes down and three stars appear. But prayer (and reciting the Shema) come first. This follows the rule that a mitzvah (commandment) that is frequent (thrice daily prayer and twice-daily Shema) takes precedence over a mitzvah that is performed less often (the seasonal counting of the Omer).
Like all mitzvoth, a blessing is recited before counting the Omer:
Barukh atah A-donai E-loheinu Melekh Ha-ʿolam asher qid’shanu b’mitzvotav v’tzivanu ʿal S’firat Ha-ʿomer
Blessed are You, Lord our God, King of the Universe, Who has sanctified us with His commandments and commanded us to count the Omer
When counting the Omer, we count both the total number of days and weeks and days. For example, the twentieth day is counted, “Today is twenty days, which is two weeks and six days to the Omer.” Counting the Omer should be done while standing.
After counting the Omer, it is customary to say: “May it be Your will that the Temple be rebuilt speedily in our days.”
If the person misses the time of counting, the Omer can be counted all night. If the entire night goes by without counting, the Omer can be counted the next day without a blessing.
If a person is asked what day of the Omer it is before he has counted, he should answer, “Yesterday was…” so as not to inadvertently count the Omer without a blessing.
If he neglected to count one day [i.e., both at night and on the following day], or if he counted the wrong number, he may no longer recite a blessing when he subsequently counts, but he must nevertheless continue to count. However, if he does not remember whether he counted or not, he may continue to count the remaining days of the Omer with a blessing.