Add the numbers after each symbol
See the little 3 after K? that means that there are 3 atoms of Potassium in each molecule of K3PO4. Then you have no number after P (which means you have 1, just like in algebra) and a 4 after O. In each molecule of K3PO4 there are 3 Potassium, 1 Phosphorous, and 4 Oxygen atoms.