I carry my .40 S&W P07 just about every day. I have a couple P01 Omegas in 9MM, a CZ75 Compact 9MM and even one of those CZ75 Compacts with the P01 style frame. And I carry the P07 .40.
Reliable, accurate, feels good in my hand. Hols 13 rounds of hot 135 grain hollow points with a spare magazine of 17 more on my left hip.
A 9 just can't push that weight bullet at the same speed as a .40. The 9 would be 3 more rounds but I'm not sure the numbers add up in the 9's favor just on round count alone. Before we get the 9MM is just as effective as any other handgun cartridge I'm old enough to remember the first time the FBI and the scientific studies made the same claim back in the early 80's. Time, as they say, will tell.
I also remember not long after Sandy Hook. I'd just bought a .40 S&W M&P FS and I could go to Walmart and buy boxes of hollow points when 9MM and .45 ACP ammo was gone off the shelves. I reload .40 now, so that's not as much of a problem as it was then.
Good luck, with which ever model you buy.