How is it determined how many electrons are transferred in redox reactions?
In short, the species you mention ($\ce{Sn^{5+}}$ and $\ce{SO_4^{5-}}$) do not exist in any chemical system at anywhere near ordinary conditions. The number of electrons shuffled in the reaction is not chosen arbitrarily, but is based on the initial and final oxidation numbers of the elements in the reaction, after the equations are balanced. The only stable compound with formula $\ce{SnSO_4}$ is made of $\ce{Sn^{2+}}$ and $\ce{SO_4^{2-}}$ ions. Hence in your reaction, $\ce{Sn}$ atoms start with oxidation number +2 and end with 0 (therefore gaining two electrons) and $\ce{Fe}$ atoms start with oxidation number 0 and end with +2 (therefore losing two electrons).

As another example of electron counting, here's the reaction between $\ce{Ba}$ and $\ce{Al^3+}$:

Oxidation: $\ce{Ba^0 -&gt; Ba^{2+} + 2e^{-}}$

Reduction: $\ce{Al^{3+} + 3e^{-} -&gt; Al^0}$

To balance the equations, the oxidation half-reaction must be multiplied by 3 and the reduction half-reaction must be multiplied by two. Therefore:

Oxidation: $\ce{3Ba^0 -&gt; 3Ba^{2+} + 6e^{-}}$

Reduction: $\ce{2Al^{3+} + 6e^{-} -&gt; 2Al^0}$

Global: $\ce{3Ba^0 + 2Al^{3+} -&gt; 3Ba^{2+} + 2Al^0}$

In the global reaction, six electrons are involved.