Atoms are made of three types of sub-atomic particle. Their properties are compared using relative charge and relative mass. A proton has a relative charge of +1 and a relative mass of 1. A neutron has a relative charge of 0 because it is neutral, and a relative mass of 1. An electron has a relative charge of -1 and a very small relative mass, about one 1800th of a proton.
Protons and neutrons are found in the nucleus, and the electrons are in shells around it. Because the electron's mass is so small, it is ignored when adding up the relative mass of an atom. The relative mass of an atom is therefore the number of protons plus the number of neutrons. For example, an atom with 3 protons, 4 neutrons and 3 electrons has a relative mass of about 7.
An atom has no overall charge. The +1 charge of each proton is cancelled by the -1 charge of each electron, so the number of protons equals the number of electrons.