SO2 has atomic mass 64.
that is 64 gram SO2 has 6.022×10^23.
so 10gm would have =(6.022×10^23×10)/64 molecules=N1
O2 has atomic mass 32
simillarly 10 gram O2 will have= (6.022×10^23×10)/32 molecules=N2
clearly N2>N1
hence O2 will have greater number of molecules