A step-by-step solution:
There are 3 moles of Na, 1 mole of P, and 4 moles of O in Na3PO4. So there is a total of 3 + 1 + 4 = 8 moles in Na3PO4.