Sulfur has 16 electrons which gives an electronic structure of :
So you can see there are 6 electrons in the outer energy level which are available for chemical reactions.
It is better to think of oxidation states rather than valency.
The oxidation state , or number, is the charge on the atom if the compound was 100% ionic.
Sulfur can form compounds with oxidation states ranging from -2 to +6.
(Note we use roman numerals to signify the oxidation state)
There are many more, but all within that range.