It gains or loses electrons to become like the Noble gases having 8 valence electrons to become the most stable.
Cations are formed by losing electrons in the valence shell of atoms. There are more protons than electron ions making the atom more positive.
In every molecule of

there is 8 atoms of Carbon.
IF we have 3.7 moles of

to find the number of moles of Carbon, just multiply by 8
3.7 * 8 = 29.6 mol Carbon