No, they aren't.
You buy a 24MP DSLR and it has 24 million sensors, between red, green and blue. No more. The image is produced by demosaicing which gives less resolution. And the anti-alias filter in front will smear details on its own.
I've owned camera without the anti-alias filter, it gives much greater resolution but also opens up the possibility of very ugly, nasty color artifacts.
Cameras like the Sigmas with the foveon sensor have no Bayer mosaic, but the manufacturer exxagerates the pixel count. A sigma camera of, say, true 14MP, is advetised as 42MP: "14+14+14 megapixels" (one for each color). But this one will give true 14MP of detail.