Sulfur has the coefficient of 2, and nothing else. This indicates Sulfur has 2 atoms.
Oxygen on the other hand, has a subscript of 2, as well as the coefficient of 2. Multiplying those, and you see Oxygen has 4 atoms.
So your answer is 2
Also remember there is a 2 in front of S meaning there are 2 Sulfurs.
If it was S02 it would be 1 Sulfur as there is no number in front of sulfer.
Remember the number in front of a element, represents how many atoms there are :)