If the equation is balanced the amount of atoms in the reactants will be the same in the products
Number of atoms in reactants 2NaN3
Na - 2
N - 6
The 2 applies to the whole compound, multiple 2 by 3 for the nitrogen
Number of atoms in products 3N2 + 2Na
Na - 2
N - 6