The Torah clearly states that the Misva of counting the Omer is to count both the days and the weeks of the 49-day period. Maran (489:1) writes that when one reaches the seventh night, he adds that it is one week to the Omer.
If on the seventh night, he forgot to count the week and only counted the days, what is the Halacha?
The Mishna Berura (489:7) discusses this and cites opinion of the Magen Abraham (Rav Abraham Gombiner, Poland, 1637-1682) that he fulfilled the Misva B’diavad (after the fact). He then cites the opinions that he did not fulfil the Misva whatsoever, and must count again. His conclusion is to count again without a Beracha, since the disagreement generated a Safek (uncertainty). He should correct himself at night or even during the day. However, if he did not count again, he may continue counting the rest of the nights with a Beracha.