Q. Someone who has to undergo a major medical operation during Sefira and likely won't be able to count at least one day of Sefira, therefore, he will not comply with Temimot requisite. Should he still count with a brocho until he undergoes the operation?
A. On a similar question 783 regarding a very ill patient who the doctors say could go into coma soon and is not expected to remain alive more than a week if he can he still count sefira with a bracha, we wrote "Poskim rule that he can count even if it is likely that he may chas vesholom not be alive at the end of the sefira since he did as much as he was able to do in his condition. (Yad Yitzchok 2: 48: 2, Betzel Hachochmo 5: 45, Rav Poalim 3: 32, Kinyan Torah 5: 45). Others add that it is not in the hands of the physicians to determine the end of a human life; that is only Hashem's prerogative.
Moreover, not counting with a brocho anymore may have a detrimental effect on his morale, assuming that he will to live. That may indeed shorten his life. (Mekadesh Yisroel – Sefira 28)"
Poskim disagree when one misses counting one day of Sefira if retroactively all the blessings one recited are considered to be Levatalah or in vain. Chida in Avodas Hakodesh (7: 217), maintains they are.
However, most Poskim as mentioned, assert that although he did not comply with the essential condition of the weeks being Temimos or complete, the brochos are not in vain. They permit reciting until the day he wont be able to do so anymore.
Horav Shlomo Miller's Shlit”a opinion is similar.
Rabbi A. Bartfeld as advised by Horav Shlomo Miller and Horav Aharon Miller Shlit'a