Answer
a) N=1, H=4, Cl=1
b) Mg=3, P=2, O=8
c) Na=1, C=1, N=1
d) Ba=1, H=2, C=2, O=6
Work Step by Step
To find the number of each type of atom in a compound, we need to look at the subscript which is written after the symbol of that atom.
If there is no subscript written, then it is taken to be 1.
If the element of a particular compound is enclosed in a bracket (forms polyatomic ion), then we need to multiply the subscript of individual atoms by the subscript after the bracket.
For Example, in $Mg(PO_{4})_{2}$ , Number of Mg atoms= 1
Number of P atoms= 1$\times$2 =2
Number of O atoms= 4$\times$2 =8