It's not uncommon to hear on Friday afternoon, "I'll light candles al t'nai that I am accepting Shabbos later." The statement doesn't mean "on condition", but "according to the conditions herewith expressed." The point is that mitzvah observance is mediated by kavana/intent. There are basically three ways you can go with this: kavana b'feirush (explicit intention), stam kavana (eh... que sera, sera), and kavana l'hepech (oh, no, I certainly do not mean that to take effect).
The Friday afternoon ritual is required because women have a long standing tradition of accepting Shabbos with their candle lighting. If a women is running late, however, she can have kavana l'hepech that this act of lighting not be connected to her acceptance of Shabbos.
A similar t'nai is commonly used for eiruv tavshilin. The rav of the city will make his eiruv earlyish on erev Yom Tov with the condition to include anyone who does not have an eiruv of his own before Yom Tov due to forgetting (due to being busy, not out of laziness), or unforeseen circumstances (a rat eats eat, for example; no, not his pet rat, Willard's rats). That condition specifically excludes those who made an eiruv of their own (or who willfully neglected to make one) and allows them to therefore make a bracha on their own.
Making a tanai should be done, generally speaking, only b'di'avad. There are reasons, after all, that mitvah observance has been done a certain way. The candle lighting scenario, for example; there is the shitah of the Aruch that Shabbos actually starts 18 minutes before sundown. That means that to get "tosafos shabbos" (adding onto Shabbos from the weekday) and the shitas haAruch, one really needs to light 20 minutes before sh'kiyah. The real takanah of eiruv tavshilin is for each household to make their own in order to really start their Shabbos preparations before Yom Tov.
Sometime, however, the t'nai can even be l'chatchila. S'firas ha'omer, for example. It is really too early to count (l'chatchila) right after the ma'ariv that comes on the heels of sh'kiyah. On the other hand, it is sooo easy to forget later when one is alone. The advice, therefore, is to make a t'nai that the counting I am doing now is with intent not to fulfill the mitzvah (kavana l'hepech), unless I forget to count later, then this counting retroactively should be considered as my counting (with kavana b'feirush). That way you are covered on both sides.
One thing you can't do is to try to address the s'feika d'yoma issue by saying, "If Pesach was really on the our first day, then today is 22 days which is 3 weeks and one day of the omer, but it Pesach was really on our second day, then today is 21 days which is 3 weeks of the omer." That doesn't work because you never really counted at all. Counting with a t'nai is counting; expressing doubt about today is this or that just isn't counting.
Clear? I know, I know... it depends...