Answer :
Usually, the group number of the element would tell you the amount of valence electrons. In an element, their needs to be a full octet in order for it to be stable (aka happy element). Octet means 8 valence electrons in its orbital.