Currently, the K5 is the top-rated APS format (cropped) DSLR tested from DxOLabs. But Nikon's new D3200 is very close to the K5 in performance, and for most purposes equal.
And that is with Nikon's new entry level DSLR.
Imagine if Nikon has raised the bar so high for entry level cameras, that when they come out with the advanced amateur APS DSLR(s) later this year (which competes with the K5), how much more they will offer.
However, this has little bearing at all on how well you will be able to take photos. An accomplished photographer will be able to use the flexibility and power of either camera to take great photos.
What is of concern though is that Pentax may or may not have a "home" as the brand has bounced from manufacturer to manufacturer as of late (twice in the last 4 years or so). What this means to the long-term health of the brand is not known, so I guess we will need to wait and see if they get sold to yet another manufacturer in the future, finally become stabilized as a solid camera brand, or be discontinued.
Only the future knows.