Molecular Orbital Theory and No. of bonds The order of filling of molecular orbitals $\ce{O2}$ by MOT is this :



But from it, how can I deduce that there is one sigma and one pi bond in an oxygen molecule ?
Overall bond order equals number of electrons that occupy bonding orbitals minus numer of electrons that occupy antibonding orbitals divided by two.

Now you can apply the same concept indivudually:

For s molecular orbitals, both electron pairs "cancel out".

For p molecular orbitals, you have 2 electrons in sigma bonding orbitals and none in sigma antibinding orbitals, which means (2-0)/2 = 1 sigma bond.
Also, you have 4 electrons within pi bonding orbitals and only 2 electrons within pi antibonding orbitals, which means (4-2)/2 = 1 pi bond.
This yields the result that you expected.