J.R. S. answered 09/22/20
Ph.D. University Professor with 10+ years Tutoring Experience
The number of valence electrons can generally be determined by the group number in the periodic table (with the exception of transition elements). Ranking these from most to least valence electrons we would have:
Ar(8) = Ne(8) > F(7) = Cl(7) = I(7) > S(6) > N(5) = P(5) > C(4) > B(3) > Mg(2) = Be(2) = Ba(2) > K(1) = Li(1)