In order to attain stability, the elements such as carbon and hydrogen need 4 and 7 electrons respectively.
As the elements such as carbon and hydrogen are in need of electrons, they are called anions (the electron gaining substances) and they gain required electron from the cations, the substance which readily losses electrons.
As far as carbon is concerned, as it can readily accept four electron, it need four atoms of cations.