>>898636Megapixels is generally there for marketing; more doesn't mean better. Stupid people don't know any better.
The optics you put in front of the sensor makes a bigger difference than the sensor itself. Shitty glass, shitty image.
A bigger sensor with bigger pixels (usually translates to fewer megapixels) is better at grabbing photons, which means it'll work better in low-light. It's why my 6mp point-and-shoot is better than my 8mp cameraphone, the P&S's sensor is over 10x the surface area of my phone.
My Nikon's only a 12mp sensor, body's about 6 years old. Snap a good lens on the front and it'll take great shots.
K50's a great camera. There's newer stuff out there, but if you're just getting into /p/eeing, used gear holds its value real well while you figure out what you really want.