(a) Each sample contains one mole of its entities, that is 6.022×1023 entities: 6.022×1023 molecules in the first and 6.022×1023 atoms in the second.
The masses differ: 1 mol of O2 has a mass of 32 g, while 1 mol of O has a mass of 16 g. Since each O2 molecule contains 2 atoms, the first sample contains 2×6.022×1023=1.204×1024 oxygen atoms.
(b) A statement such as "1 mol of oxygen" could mean either sample, and these differ by a factor of two in mass and in the number of atoms. The mole counts entities, so the count is meaningful only when we say what is being counted: atoms, molecules, ions, electrons or other particles.