I've had two Glocks. Both are superb, accurate, reliable, easy to maintain, durable, and very functional. I'd have to rate them as one of the best handguns ever made.
The .40 caliber is an excellent caliber, but so is the 9mm and .45, for self defense or duty. 9mm has the advantage of being less expensive which means more range time. Shot placement is more important than caliber when comparing these similar man stoppers, so I'd say that based on your budget you'll want to make sure you can spend alot of money on shooting. If you're on a budget go with 9mm (about 20% less expensive per shot). 9mm has been around for a long long time and is the most common pistol cartridge in the world by far, and has served in many many wars.
If you're not on a budget, the .40 and .45 are about the same price for ammo. Both are slightly better man stoppers than the 9mm because they typically create larger wound channels and more shock to the body. There are a zillion posts on this topic, so lets not turn this into a debate; just pointing it out to the poster.
Generally, the smaller the bullet the more shots. For instance, in the same size gun, you might get 15 9mm, 13 .40, or 10 .45 shots.