My Glock hold 15 in the mag and 1 in the chamber. most 9s are the same. .40s are usually about 155-165 grns as opposed to 115-125 for 9s, in my book that’s a lot more stopping power. This is all personal preference I know, and from a tactical aspect round placement is more important that bullet weight. All things being equal, I’ll take the bigger and heavier bullt
I prefer 9mm for two reasons: First, the stopping power of 9mm +p 124g JHP is not much less than a .40. Second, the cost of 9mm is 25% to 50% less than .40, which means more time at the range, more practice, improved shooting skills, and better shot placement, which is the most important factor in self-defense.