Atoms and the periodic table
An atom is identified by its number of protons, and elements with similar outer-electron patterns, like a periodic table column, react in similar ways.
A worked example
Aluminium has atomic number 13 and mass number 27, so it has 13 protons and 27 minus 13 equals 14 neutrons. A neutral atom also has 13 electrons, matching its 13 protons.
The mistake people actually make
Mass number is protons plus neutrons, not protons alone, so finding neutrons always means subtracting the atomic number first. A neutral atom's electron count equals its proton count, not its mass number.