How many mole of oxygen gas is there in the atmosphere?
It is easier to calculate:

The pressure of air on the ocean level is $\approx 100 \rm {kPa}$.
Thus, its weight is $\approx$ 100000N over $1 \rm m^2$.
Considering that the overwhelming majority of the atmosphere is below some km over the surface of the Earth, we can ignore the decrease of the gravity with height.

Now calculate the mass of the air above a square meter (ten tons). And multiple it with the surface of the Earth (in square meters). Then, divide it with the mean molar mass of air and multiple with the partial pressure of $\ce{O2}$ in it ($\approx$ 29%).