How do you determine the number of valence electrons in an element?
The periodic table contains rows and columns. To find how many valence electrons are in an element, simply locate the column number that it is in, and that determines the number of valence electrons in an element.
This rule works only for elements excluding the transition metals. See below attachment to summarize my explanation.
Hope this helps! :)