The atomic weight of oxygen is 15.999 grams/mole. Each mole has a number of atoms equal to the Avogadro constant, ≈6.022*1023. So, 4 grams of oxygen is
4 g/(15.999 g/mol) = .250 mol = .25*6.022*1023 atoms = 1.506*1023 atoms.
_____
Since we're counting atoms, it matters not that they happen to be clumped into O2. An atom of oxygen weighs the same whether it is part of O2 or not.
4 g/(15.999 g/mol) = .250 mol = .25*6.022*1023 atoms = 1.506*1023 atoms.
_____
Since we're counting atoms, it matters not that they happen to be clumped into O2. An atom of oxygen weighs the same whether it is part of O2 or not.