So the atomic mass number is simply the number of protons plus the number of electrons. The bottom number represents the atomic number. We are not so lucky. The bottom number is always the number of protons. The bottom number is also usually the number of electrons, but only in a neutral element.
Ions come later.
The number of neutrons is always the top number minus the bottom number. All you're doing is taking the total mass, taking away the portion that is due to the protons, and what you got left is the neutrons. Likewise, if you know number of neutrons and protons, to find this number all you got to do is add. Here is a sample atom. The bottom number is always the number of protons you have.