5 mg is .005 grams. The molar mass of hydrogen is approximately 1 gram for 6.02 E23 atoms, each one having one nuclei so you could say 6.02 E23 nuclei per gram for hydrogen. (note: the E23 notation means the same thing as 10^23 power). Multiply 0.005 grams times 6.02 E23 nuclei per gram and you get 30.1 E20 nuclei or 3.01 E21 nuclei.
This method assumes you were talking about hydrogen atoms singly. If you meant hydrogen molecules then the molar mass is about 2.0 grams for 6.02 E23 molecules each of which has 2 nuclei. So that is 12.04 E23 nuclei for 2.0 grams. Multiply your 0.005 g times this last number and divide by 2 to get your number of nuclei.