To determine the number of atoms in a given mass of a substance, you need to know the molar mass of the substance and use Avogadro's number. However, you mentioned "10 grams of p," and it is not clear what "p" refers to. Please provide more information or specify the element or compound you are referring to so that I can assist you better.