Carbon (C) has 4 . This allows carbon atoms to make four covalent bonds.
You can determine the number of valence electrons in any atom of an element belonging to the representative elements (main group) by determining its electron configuration. The outermost (highest energy) s or s and p orbitals will contain the valence electrons for an atom of an element belonging to the representative elements. The representative elements are the Group A elements or Groups 1 and 2 and Groups 13 – 18 depending on the version of the periodic table you are using.
So how do you determine the number of valence electrons for a carbon atom? First you need to know that in a neutral atom the number of electrons equals the number of protons. The number of protons is the atomic number of an element. The atomic number of carbon (C) is 6. Therefore a neutral carbon atom has 6 protons and 6 electrons. The electron configuration for carbon is ##1s^2####2s^2####2p^2##. The outermost s and p orbitals in the 2nd energy level contain 4 electrons and these are the valence electrons for a carbon atom. Therefore a neutral carbon atom has 4 valence electrons.
There is a short cut you can use to determine the number of valence electrons for an atom of a representative element just by looking at the periodic table and that is the Group number. For the Group A designation system the Group number is the number of valence electrons. For example Group IA atoms have 1 valence electron Group IIA atoms have 2 valence electrons Group IIIA atoms have 3 valence electrons and so on until Group VIIIA atoms which have 8 valence electrons.
For periodic tables that number the groups on the periodic table consecutively from Group 1 to Group 18 Group 1 atoms have 1 valence electron Group 2 atoms have 2 valence electrons Group 13 atoms have 3 valence electrons Group 14 atoms have 4 valence electrons and so on until the Group 18 atoms which have 8 valence electrons.
The transition and inner transition elements are not as simple as the representative elements and I have not included them here.
The National Institute of Standards and Technology in the USA have a printable periodic table with the electron configurations of all of the elements. You can find it here: http://www.nist.gov/pml/data/periodic.cfm