I assume it knows, but it would be smart to test it once to make sure. In theory, it might even depend on whether or not the song was stored on your iPod at the time, but I'm guessing it will be smart about it.
Think of "iTunes WiFi Music Store" as mere branding. A good analogy is that there is a version of iTunes for the Mac and one for Windows, and now there will be one for iPhode (you like that? iPhode? I mean the iPod touch is just a stripped iPhone running the same OS with same interface; so iPhode represents the capabilities they share.) So, if you buy music from two computers authorized to your account, your Windows PC you are forced at gunpoint to use at work, and your your lovely Mac at home, iTunes Store still knows what you bought. (And remember you can now transfer purchased music from one authorized computer to another via your iPod. It'll ask you and copy it over, to the iTunes computer the iPod or or iPhode is associated with.)
It's just a custom auto body style, really -- all on top of the same frame and engine. Everything is tied to your Apple ID, which is your iTunes Store account name. Doesn't matter from where you buy.
Now whether or not you'll have to burn up a computer authorization for your iPhode, I don't know. I doubt it, since you can authorize only so many computers running iTunes but you can sync as many iPods as you wish with those computers authorized for your purchased music. And since the iPhode is just an iPod that can buy, it doesn't really change anything about the licensing arrangement. The purchased tracks just get to the iPod before they get to the authorized computer's iTunes library, a first, but it doesn't actually increase the number of computers authorized to play purchased music (yeah, I know iPhode is really just a small, rather powerful computer, but for simplicity's sake). iPod and iPhode count is unlimited and it will only sync your WiFi purchased music with computer already authorized. So noo problem.
Whew! I'm longwinded tonight. But you get it: the account and account history goes with the store, not the device, and the WiFi Music Store is just a different interface on the same store, one that displays things in a different way, won't allow video purchases and has some other unique features (Starbucks tie-in stuff), but it's still the same iTunes Store running it all.