Glock and Smith & Wesson are #1 and #2, respectively, in worldwide sales.
Neither gun is perfect, but for different reasons:
The Glock is an ugly duckling and ergonomically devoid. It is a simple, yet effective design, which has changed very little over its history. Yet, it is eerily reliable, and like a Timex, can take a licking and keep on ticking.
In stark contrast, the Smith & Wesson M&P is very pleasing to the eye, and feels great in hand, yet has struggled to improve in the area of performance over its brief history.
Both guns are deadly accurate at combat distances.
So, the choice is yours.