The cages for a double and triple are shaped differently, so you need to get the derailleur for the right number of chainrings in the front. The derailleur also needs to have enough capacity to shift between the chainrings you have as well as clear the largest chainring. As usual, Sheldon is a good person to start with regarding FD selection. The number of rear speeds (the 9 in 2x9) marked for a front derailleur isn't too important, but the cage of the derailleur may be thinner for higher number of rear speeds (so if your chain isn't designed for high enough speeds, you may have some rubbing on the cage, especially if you don't adjust it properly) -- as Sheldon points out though, the distinction based on number of cogs in the back is primarily for marketing.
Obviously, you also need to make sure the derailleur will be able to be mounted on whatever type of mount your frame uses (this includes how the cable is pulled - bottom or top).
And finally, you have to worry about cable pull ratio, so if you're using brand X, buy a brand X front derailleur, and if it is a road (mountain) FD, buy a road (mountain) FD if you have road (mountain) shifters (which should obviously be matched with the number of chainrings in the front).
1) Number of rear cogs doesn't matter - the shifting in the front is effectively independent of whats going on in the back.
2) Number of front chainrings does matter, but there's more to it than just matching the number of chainrings.