You can if you knew all the individual compounds and elements that make it and the amount. In chemistry, you will learn that the atomic number of an element in grams is one mole of the element, which has exactly 6.022 x 10^23 atoms. molecular/formula mass in grams is one mole of that compound, with 6.022 x 10^23 molecules of that compound. this number 6.022 x 10^23 is Avogadro's number, or NA (A is the subscript).
Now, relating to mass, to find number of moles (n), given a mass of an element or compound, we say n = given mass of substance/ Molar mass of substance. the molar mass is the sum of all the masses of the elements in the substance i.e H2O is (1 x 2) + 16 as H has a mass of 1 and O has a mass of sixteen, using a periodic table.
Then if you have n, Number of atoms or molecules = n lots of avogadro's number.
Eg. find the number of molecules of water in 18g of water.
number of moles = 18/ (1 x 2 + 16)
= 1
No. atoms/molecules = 1 x 6.022 x 10^23 = avogadro's bumber of molecules.
You would need to repeat this for each element/compound you find and know their masses for the moon.