Carbon has the electronic configuration 2,4. It has 4 valance electrons and to combine with other elements, it can either transfer these 4 electrons or gain 4 electrons from the element it combines with or share these 4 electrons with the other element. As it can share 4 electrons, it can form a maximum of 4 covalent bonds.