Sulfur is in Group 16 of the periodic table and has 6 valence electrons. In a molecule like sulfur dioxide (SO₂), each oxygen atom typically forms a double bond with the sulfur atom. In this case, sulfur shares 4 of its valence electrons with the two oxygen atoms (2 electrons for each double bond).
So, the answer is 4.