So I am completely and utterly confused about why sulfur has $12$ valence electrons. I understand in it's configuration, it has $2$ electrons for the $3\mathrm s$ subshell, and $4$ electrons from its $3\mathrm p$ subshell, and it can use the $3\mathrm d$ subshell since its in period $3$. Therefore it is able to exceed the octet, and form more than just $4$ covalent bonds.
But how exactly do you calculate the exact number of "$12$ electrons" in the valence electron, which thus allows it to participate in $6$ covalent bonds with oxygen in the sulfate ion, $\ce{SO4^2-}$? I can't seem to understand.
Thanks so much!