The number of gram atoms or number of gram moles can be calculated from the stoichiometry of the chemical reaction. The balanced chemical equation gives the number of moles of the reactant or product and from that the number of atoms can be calculated.
Number of atoms = mole x avogadro number x number of atoms in the molecule (or number of atoms in the question asked)
For ex