Not always, but usually, yes. I've seen cheap Kodak reflex cameras that take worse pictures than my old VGA phones. (OK, I exaggerate, but they were bad). But you make a good point. With old cameras, if you had a VGA pixel count, you didn't get awesome pictures even if you used state-of-the-art lenses and quality sensors. But at the current state of things with everyone that matters offering at least 6 or 8 MP on their cameras, the lenses and sensor quality become much more important than just MP count.
However, it also depends on what you intend to use your picture for. If you're going to print out simple pictures from your vacation to have in an album, 3 to 5MP should be more than enough, but if you intend to use a picture for a very large ad or banner, even if you shoot with a top-of-the-line reflex, if your MP count is too low for that size, you'll still see pixellation or blurry edges.