Metals consist of giant structure of atoms arranged in a regular pattern. The electrons in the outer shell of metal atoms are shared , and are free to move throughout the structure. Therefore the structure is formed by positive charged metal ions held together by a 'sea' of delocalised.
Carbon will have 4 valence electrons. It will have 2 in the p orbital and 2 in the s orbital. You can see this when you find the noble gas configuration of carbon which is [He]2s²2p² showing that carbon has 4 valence electrons.
I hope this helps. Let me know if anything is unclear.
The gram formula mass of P2O5 is 31*2 + 16*5 =142. The mole number of P2O5 is 0.380/142=0.00268 mol. There is 7 atom in one P2O5 molecule. And there is 6.02 * 10^23 molecule per mol. So the answer is 1.13*10^22 atoms.