This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
Valency shell electrons number = group number for s block or p block elements in the periodic table = total electrons in the outer most shell or quantum number

Valence shell is the outermost shell or the outer most energy state of the atom of that element.

S Block :

       Group 1 :  Hydrogen (1s¹),  Lithium (2s¹), Sodium (3s¹)   etc.   : 1
       Group 2:   Helium(1s²), Beryllium (2s²), Magnesium (3s²) etc.  : 2

P block elements
      Group 3:   Boron (2s² 2p¹ ), Aluminium ( 3s² 3p¹) etc    : 3
      Group 4:   Carbon (2s² 2p²),  Silicon (3s² 3p²)  etc      : 4
      Group 5:   Nitrogen (2s² 2p³ ),  Phosphorus (3s² 3p³), etc.  : 5
      Group 6:   Oxygen (2s² 2p⁴ ),   Sulfur (3s² 3p⁴) etc  : 6
      Group 7:   Flourine (2s² 2p⁵) ,   Chlorine (3s² 3p⁵) etc   : 7 
      Group 8:   Neon (2s² 2p⁶),    Argon (3s² 3p⁶) etc   : 8