In my limited experience, rapid job changes at the outset of one's career aren't particularly damaging -- providing you can offer an honest and reasonable explanation. I left my longest job because I had to move in support of my wife's career. I left my shortest job because the technical lead was toxic and the work would have led to a dead-end career. I'm leaving my job today for a variety of reasons which I've discussed amicably yet honestly over a period of several months with my manager. In no case was a better salary or some other material gain the primary motivation behind my decision to leave.
There's something to be said for getting exposure to a variety of environments early on. Freelancing, consulting, part-time jobs, summer jobs, and co-op terms can help to maximize exposure without much risk of negative career implications. If you have good priorities -- e.g. eventually ending up in a fulfulling, long-term job with appropriate pay -- a few changes will likely do more good than harm. But if you routinely leave when the technical challenge stops being sexy or if you attempt to get a cushy job with nothing but shortcuts, you can find yourself in trouble.