A common conversion factor is that 22.4 liters of a gas at STP is equal to one mole of that substance.
21 L / 22.4 L = 0.9375 moles of CO2
One mole of any substance contains an Avogadro’s number of atoms: 6.022 x 10^23 atoms/mol.
0.9375 mol x (6.022 x 10^23 atoms/mol) = 5.646 x 10^23 atoms of CO2
21 liters of CO2 contains 5.646 x 10^23 atoms of CO2.