For recently replaced, Sony stopped production in mid-2012 after two full years of producing it, and replaced it with the 24 MP models (the 20 MP in between that Pentax used isn't a Sony sensor).
From a technical image quality standpoint, a D3200 bundle will pretty soundly win over the K-50. More megapixels, better dynamic range, better high ISO performance, lower light AF, better metering, and so on, and the kit lenses have better resolving power (the D3300 extends this with the newest redesigned 55-200 optic being better still). The K-50 is weather sealed, and you have to move up to the D5x00 series Nikon to get weather sealing (though the lenses are sealed even at the base models); and to get a pentaprism viewfinder you need to move to the D7x00 series, but for technical image quality the bottom of the line Nikon is, for all intents and purposes, state of the art in crop sensors.
I'm in the somewhat (although not completely) unique position of shooting both the latest 24 MP sensor (D7200) next to the older 16 MP sensor (D5100), and there is a difference, and beyond the pure megapixels. On kit lenses and variable aperture zooms it's smaller, but particularly with high resolving power lenses (Micro-Nikkor and telephoto primes) it can sometimes really jump out at you. As an example: I took a picture of my dog, and you can see me reflected in his eye with the 24 MP sensor, while similar pictures on the 16 MP sensor the reflections are indistinct.