Halacha requires that when a person recites the Beracha before counting the Omer, he should already know in his mind which number he must count that night. It is improper to recite the Beracha and then wait to hear the counting by the Hazan or somebody else in order to determine that night's counting. Whenever one recites a Beracha before performing a Misva, he must perform the Misva immediately after concluding the recitation of the Beracha, without making even a silent pause in between. One must therefore determine in his mind the number of that night's counting before he recites the Beracha, so that he can count immediately after reciting the Beracha without any pause. This is the ruling of a number of Halachic authorities, including the Haye Adam (Rabbi Avraham Danzig of Vilna, 1748-1820) and Rav Shneur Zalman of Liadi (1745-1813).
Nevertheless, if a person did not know which number to count before he recited the Beracha, he has fulfilled his obligation; his counting is valid and he may continue counting with a Beracha on the subsequent nights.