What kind of carbon ions exist? I think there are $\ce{C^{4-}}$ and $\ce{C^{2-}}$ existing. How can we find the charge of ions in the elements? Should we look at the group or valence?
Many different carbon ions exist in the gas phase.  

In Electronic spectra of linear carbon anions, spectra of $\ce{C_2^-}$, $\ce{C_3^-}$... $\ce{C_10^-}$ are discussed.  

Dianions such as $\ce{C_7^{2-}}$ have also been observed.

In the solid phase, aluminum carbide and berylium carbide have more than 50% ionic character according to the Handbook of Refractory carbides and nitrides, and correspond to $\ce{C^{4-}}$.  Calcium carbide, which could be considered a salt of acetylene, corresponds to  $\ce{C2^{2-}}$  rather than $\ce{C^{2-}}$