Are there planets that do not rotate on their axis? I was reading a thread about how a pendulum would be affected if the Earth did not rotate and Larian's answer made me wonder if all planets rotate necessarily due to physics.
So that's the question: is it possible for there to exist a planet* that doesn't rotate at all and why?
* In any solar system or galaxy.
 A: Will or will not rotate relative to what?
It's extremely unlikely that the protoplanet could somehow have exactly zero angular momentum, so it will certainly be rotating.  And even if it could form, you would expect the inevitable collisions to impart some angular momentum to it.
Also, given enough time, even a "nonrotating" planet (if it could be formed) would become tidally locked to something else -- its star, its satellite, or somehow resonantly locked to another body in the solar system, depending on the relative gravitational strengths and the layout of the system.  Tidally locked bodies are certainly rotating, they just rotate at the same rate as they revolve around their locked partner.
A: Like the other answers have pointed out, any collapsing matter forming a planet will always have some amount of angular momentum upon formation.  I will add one thing - that it is possible for a planet to have zero rotation at a single point in their history.
There are two relevant cases:


*

*A planet rotates in the same direction as its revolution

*A planet rotates opposite its revolution


The first case is much more likely because the same rotating cloud of gas that forms the solar system forms the planet, so the local clump of matter that forms the planet should have the same direction of rotation as the whole.  The universe, however, is not so consistent.  Venus, in particular, rotates in the opposite direction of how the solar system is spinning as a whole.
The Earth will never be non-rotating, but Venus will if it lasts that long.  Tidal locking wants to make the rotation the same angular frequency as the revolution.  In the case of Earth, this will cause the planet's rotation to slow and asymptotically approach 1 rotation per year (in the year unit of the future), counter-clockwise looking down from the North Pole.  It will never stop rotating in this transition.
From the same view, Venus rotates clockwise and is also slowing, but it also approaches the rotational speed of 1 rotation per year counter-clockwise just like Earth.  That means that at some point in the future Venus will be not rotating.  Technically, this only occurs at some infinitesimally small moment, but in reality the change is so gradual that it would have practically no rotation for 1,000s of years.
This discussion is, so far, academic because our solar system is probably a bad example.  It is likely that the sun will flare up before the rotation of Venus comes to a standstill.  After that, whatever's left of Venus may still exhibit this state sometime in the future.  Other solar systems almost certainly host a planet with near zero rotation under normal circumstances right now.  The rarity of those planets is up for discussion, but clearly, a planet rotating in the opposite direction of its rotation is a relatively normal occurrence.
So the answer to your question is basically yes.  Planets that are transitioning from spin in one direction to another direction is a common occurrence, and the number that can be said to have "no rotation" only depends on how long you're willing to wait, or what tolerance you want to set.
A: A tidally locked body like the Moon of course does rotate; it just rotates at the same rate as its revolution around the primary.  Tidal locking occurs because the mass of the Moon is not uniformly distributed; the Earth's gravity acts unevenly on it, so it "falls" into a locked configuration.
From the surface of the Moon, the Earth is at a (nearly) fixed point in the sky (or below the horizon), but the stars appear to rotate.
From the surface of a non-rotating planet, its sun would appear to move through the sky, but the stars would be stationary.
But there are forms of tidal locking other than the one-to-one form that the Moon exhibits.  For example, Mercury rotates (relative to the stars) exactly 3 times for every 2 revolutions around the Sun.  This is probably because Mercury's orbit is relatively eccentric.  The same part of Mercury's surface faces the Sun at each perihelion, and any deviation from the 3:2 resonance will tend to be damped out.
I wonder if would be possible for a planet in an eccentric orbit to be in a locked 0:1 resonance, with zero rotation relative to the stars.  It would present the same face to its sun at each perihelion.  If the planet's mass is distributed irregularly, the sun's tides might tend to lock it into that resonance.  (Another nearby planet in an orbital resonance might add to the effect -- or it might subtract from it.)
I don't have the math to figure out whether such a configuration could be stable, or if so, what characteristics (mass of the sun, mass of planet, mass distribution of the planet, size and eccentricity of the planet's orbit) would be necessary to make it stable.
In any case, I would guess that it's fairly unlikely for a planet to get into such a configuration in the first place -- but that's only a guess.
A: Given the rather large volume of the universe, I suppose it's possible.  Not as an initial condition as far as I can tell though because of the conservation of angular momentum.  However, given the right circumstances of impact events on a rogue planet (with no other bodies to perturb its non-rotation), I suppose it's possible.  Highly unlikely, but theoretically possible.
As to why planets rotate, Cornell (the home of Carl Sagan) has a great explanation.

What I am saying is that there will be no planets if there was no initial angular momentum in the primordial solar nebula. If a nebula with absolutely no rotation collapses, then there will only be a central non-rotating star and there will not be any planets. Planets form out of a protostellar disk, which itself forms only because of the initial angular momentum of the cloud. The dynamics of a rotating body is of course controlled by forces like gravity. Kepler's laws are a direct consequence of gravity.

