Finding the number of atoms