The number of formula units can call molecules too. To calculate the number of molecules, we have to use Avogadro's number which is 6.022 x 10^(23) /mol and it's telling us that there are 6.022 x 10^(23) molecules of a certain compound in 1 mol.
The first step is to calculate the number of moles of 8.95 g of BaF2 using its molar mass which is 175.3 g/mol (you can find the molar mass using the periodic table):
And the final step is to convert from moles to molecules using Avogadro's number, like this:
The answer would be that there are 3.07 x 10^(22) molecules/formula units of BaF2.