How do valence electrons affect covalent bonding?
The number of valence electrons determines what other atoms an atom can bond with and how many. For example, carbon has four valence electrons and because of the octet rule, carbon wants to fill its orbital with 4 more electrons. Therefore, carbon can from four single bonds with hydrogen as in CH4. Carbon could also form C2, in which both carbons share their valence electrons to make 8. In all actuality, carbon can make any combination of bonds with other atoms as long as it satisfies the octet rule.
However, C wouldn't bond to helium, for example, because helium already has a full outer shell and doesn't want to bond to other atoms.
In sum, the number of valence electrons in an atom's outer shell determines the type of bonds an atom makes with another atom (single, double, etc.) and how many it makes.