-If one forgot to count Sefirah one night, he/she should count during that day (without a Bracha) and then can resume counting the following night with a Bracha. However, if one didn’t remember to count on that day and sunset of the next day arrived, he/she must count the remainder of the sefirah days without a Bracha.
The above Halacha is only if you are certain that you forgot to count on one of the nights.
However, if you are unsure (Safek) if you missed a night, you may continue the rest of the Sefirah counting with a Bracha. (Siman 489:8. See also Mishna Berura S”K 34. For more intricate details see Igros Moshe Orach Chaim Vol. 4 Siman 93:3 and Shu”t Minchas Yitzchak Vol. 9 Siman 57 and Kaf HaChaim 489:82)
-There is a debate amongst the Poskim regarding one who knows that he/she will miss one (or more) days of counting the sefirah (due to being under the operating knife R”L , or any other reason) if they may begin counting with a Bracha in the first place (as there is an opinion in the Rishonim that one who misses one day of counting renders all his/her previous Brachos as Brachos L’Vatalah (L’mafrea), blessings in vain)
The consensus of most Poskim, however, is that one may ndeed begin counting with a Bracha, and only after that day is missed, will they have to continue without a Bracha, and all the previous Brachos will not be rendered “in vain”. (See Halichos Shlomo page 357, Shu”t Ohr L’Tzion Vol. 1 Siman 36. This is also the opinion of Rav Yosef Shalom Elyashiv Shlita and many other contemporary Poskim)