The solution for this problem is:
1 m^3 = (100 cm)^3 = 1x10^6 cm^3 = 1x10^3 liters
5.0x10^-4 m^3 x 1x10^3 L/m^3 = 5.0x10^-1 L = 0.500 L
1.0x10^5 Pa / 1.01325 Pa per atm = 0.99 atm
n = 0.99 atm x 0.500 L / (0.08206 x 310 K) = 0.0195 moles of gas
N2 = 28 g/mol
O2 = 32 g/mol
100 g air = 21 g O2 or 0.66 moles
100 g air = 79 g N2 or 2.82 moles
0.0194 moles of air; if you assume air is 21 mole % O2, you would get-
0.0194 moles x 0.21 x 6.022x10^23 = 2.45x10^21 O2 molecules