It is because, the hydrogen is bimolecular element i.e. it contains two atoms united together like H2 while helium is monoatomic element as He.
Since, no. of atoms in1 mole of an element = avogadro no. x atomicity
So, no. of atoms per mole for hydrogen gas = avogadro no. x 2
While for helium gas, no. of atoms per mole = avogadro no. x 1
So, no. of atoms of hydrogen in one mole is twice the no. of atoms if helium in 1 mole.