While high end camera have gone upto and more than 10 MegaPixels there are still many VGA Digital cameras in the market, specially the ones with Mobile phones. If you ever asked the dealer hom many MegaPixels is the VGA camera and 'VGA cameras are a Class apart', 'They are not termed in MegaPixel...' or similar to one of this reason is being conveyed to you then the dealer is misleading you either because of ignorance or for intention.
The largest image size supported by VGA camera is 640 x 480
640 x 480 = 307200
Divide it by 1000000 (or 1048576 for purists) and round off appropriately to get the value in MegaPixels
307200 / 1000000 = 0.3072 or 0.3 (rounded)
So a VGA Camera is in fact a 0.3 MegaPixels Camera.
Similarly, for a camera with largest image supported as 1280 x 1024, the calculation would be as :
1280 x 1024 = 1310720
1310720 / 1000000 = 1.3 MegaPixel (rounded)