In the compound mercurous phosphate, the mercury atoms are exhibiting a valence charge of +1; on the other hand, phosphate ions possess a charge of -3.
Therefore, when the two ions combine, the final compound will have the formula:
Hg₃PO₄
The formula (Hg₂)₃(PO₄)₂ just contains two units of mercury (I) phosphate.