Calculating the number of atoms or molecules