The accepted Halacha is that if one forgot to count the Omer at night, but he remembered the following day, he counts that day without a Beracha, and then resumes counting that night with a Beracha. The question was posed whether this applies even if the person did not remember to count until Ben Ha’shemashot – the 13.5-minute period after sunset. This period is one of "Safek" (uncertainty), as it is uncertain whether Halacha considers it daytime or nighttime. Can the person in this case assume that it is still daytime, such that he may count henceforth with a Beracha? Or must he consider the possibility that the Halachic day ends at sunset, such that he missed an entire day of counting, and must therefore count henceforth without a Beracha?
Hacham Ovadia Yosef ruled that the person in this case may count during Ben Ha’shemashot, and then resume counting with a Beracha. The reason, Hacham Ovadia explains, is because this is a situation of "Sefek Sefeka" ("double doubt"), where two uncertainties exist, such that there are two possible factors that potentially allow the person to continue counting with a Beracha. The first uncertainty is whether a person indeed forfeits the opportunity to count with a Beracha if he misses an entire day of counting. Some Rishonim view Sefirat Ha’omer as a single Misva performed over the course of 49 days, such that one who missed a day of counting cannot then fulfill the Misva on the subsequent nights. Others, however, maintain that each night constitutes an independent Misva, and thus one who misses a day of counting may continue counting henceforth as usual. In order to satisfy both views, our practice is that one who misses a day of counting continues counting, following the second opinion, but does not recite a Beracha, in deference to the first view. However, in the case under discussion, there is another uncertainty – the individual might not have missed a day, because he counted during Ben Ha’shemashot, a period which might have the status of daytime. As there is a second uncertainty involved, Hacham Ovadia writes, we can apply the rule of "Sefek Sefeka" to allow the individual to continue counting with a Beracha.
Hacham Ovadia then addresses a question that one might pose regarding this conclusion. Seemingly, one could argue, we have here a "Sefek Sefeka" in the opposite direction, which should lead us to disallow the person to resume counting with a Beracha. Tosafot were of the opinion that the Misva of Sefirat Ha’omer can be fulfilled only during the night, and one who did not count at night cannot then count the next day. In the situation under discussion, then, we have two factors that might lead us to forbid resuming counting with a Beracha: first, Ben Ha’shemashot perhaps has the status of nighttime, in which case the individual has missed an entire day, and even if this period has the status of daytime, according to Tosafot, counting during the day is invalid. Perhaps, then, we should not allow this person to continue counting with a Beracha, because we have two possible reasons why he may no longer do so.
Hacham Ovadia refutes this argument by demonstrating that when it comes to Rabbinic obligations – as opposed to obligations required by the Torah – we apply the rule of "Sefek Sefeka" only to arrive at a leniency, and not to arrive at a stringency. The Misva of Sefirat Ha’omer nowadays applies on the level of Rabbinic enactment, and therefore we would not apply the rule of "Sefek Sefeka" to reach a stringent ruling, and we instead allow the person in this case to continue counting with a Beracha.
Hacham Ovadia proves this theory from a Halacha relevant to the prohibition of Tehum Shabbat, which forbids walking beyond a certain distance on Shabbat. The Gemara establishes that this prohibition applies Mi’de’rabbanan – by force of Rabbinic enactment – to a person at sea. On the level of Torah law, the prohibition of Tehum Shabbat applies only on dry land, but the Rabbis extended the prohibition even to sea travel. In a separate context, the Gemara raises the question of whether the prohibition of Tehum Shabbat is applicable if one is above ten Tefahim off the ground. This question is left unresolved. Now the Shulhan Aruch addresses the case of one who is in a boat on Shabbat, and does not know whether the water is above ten Tefahim, or below ten Tefahim. Interestingly enough, the Shulhan Aruch rules that the person may act leniently, and travel beyond the limit of Tehum Shabbat. Hacham Ovadia notes that this is a situation of a "Sefek Sefeka Le’humra" – where there are two factors which potentially lead us to a stringent conclusion. First, the boat might be within ten Tefahim of ground level, and even if it is higher than ten Tefahim, the prohibition of Tehum Shabbat may perhaps apply even at such a height. Nevertheless, the Shulhan Aruch rules leniently. Hacham Ovadia infers from the Shulhan Aruch’s ruling that when it comes to Rabbinic laws, we are lenient in all cases of uncertainty, even in situations of "Sefek Sefeka Le’humra." Therefore, when it comes to Sefirat Ha’omer, too, which applies nowadays on the level of Rabbinic enactment, a person may continue counting with a Beracha even if there are two "Sefekot" that potentially disallow him to do so.
Summary: If a person forgot to count the Omer at night, and remembered to count the next day, he counts that day without a Beracha and then resumes counting with a Beracha that night and henceforth. This applies even if he remembered the next day during Ben Ha’shemashot – the 13.5-minute period after sunset. If, however, he remembered only after this period, then he has missed an entire day, and may thus no longer count with a Beracha.