To calculate the moles present in the given molecules we will apply Avogadro's number. Avogadro's number tells us that in one mole of any substance there are 6.022x10^23 molecules. Therefore if we have 4.0x10^24 molecules we will have:
In 4.0x10^24 particles o molecules, there are 6.6 moles of MgO