Have you shot either? You might want to do that (and shoot some other guns, revolvers and autos) before you plunk down your hard earned money. For example, a lot of people love 40s, but I don't really care for the type of recoil it produces (9mm snap AND 45 push). I actually handle/control the recoil of 357 or 44 Mag better. In the end, I just prefer 9mm and 45 in autos.
I owned an XD9 for a while, and it was an excellent gun. I just couldn't shoot it worth a darn, I personally do best with 1911s and revolvers ... so again, take 'em for a "test drive" first if possible.
Cost of ammo isn't a big difference, though 9mm is generally a tad cheaper. However, in my area at least, 40 is MUCH easier to find right now than any other centerfire round. All the Wal-Marts in my region usually have 40 in stock, followed by 44 Magnum. I've not seen 9mm since December.:banghead:
I for one am not expecting a 1 shot drop. Imho I think the 9mm will get the 20 rounds out faster as well.
You are on the right path with not expecting a one shot stop. And though anything is possible, as others have said, if you find yourself in a position where you actually need 20 rounds, it is either because you aren't hitting what you are aiming at or your are horridly outnumbered. Obviously, both situation suck, and your best hope for survival will hinge on
you, not the platform you are carrying.
As another poster said, you've got to put the bullet where it counts. And it has to penetrate to a sufficient depth to hit something important to the badguy's functioning. Most high quality JHP 9mm or 40 loads will do that. So will 45 ACP, 357 Sig, 357 Mag, 38 Special, 44 Spl, 10mm ...
Don't worry about the round count, just choose the one you shoot better. If it is a wash, check availability in your area and pick the one that will be easiest to feed. I actually saw a guy at a range that rented a pair of Glocks (a 19 and a 23 IIRC) and he shot approximately 6" groups at 7 yds with the 9 and groups that measured in feet with the 40
. He picked the 40 because the bullet was bigger
. In his case, size would make a difference if we were talking 9mm vs 120mm smoothbore
.
Good luck, and enjoy the hunt!