The identity of an atom is characterized by its atomic number, #Z#.
#Z=1#, the element is hydrogen; #Z=2#, the element is helium;...... #Z=26#, the element is iron.
And if #Z=6#, the element is carbon. Of course, a given nucleus may contain various, differing numbers of neutrons, and this gives rise to the phenomenon of isotopes, the same element with a different mass. Most carbon nuclei contain 6 neutrons, i.e. 6 massive nuclear particles with zero charge, and thus the most numerous istope is #""^12C#, a few contain 7 neutrons to give #""^13C#, which is a very important isotope for direct characterization of organic molecules, and an even smaller percentage of carbon nuclei contain 8 neutrons to give the #""^14C# isotope.
In short, the number of protons determine #Z#, and thus the identity of the element; the number of neutrons determine the mass. Most heavier elements have a range of isotopes, and the average isotopic mass is quoted on the Periodic Table.