Number of protons in nucleus of an atom is called atomic number. This also equals the number of electrons present around nucleus of the atom.
Total number of protons and neutrons in nucleus of an atom is the mass number.
Number of neutrons = Mass number - Atomic number = A - Z
Example