: 5 coins
The difference between the amounts
Dan: 9$\times$20p = £1.80
Ann: 8$\times$50p = £4.00
Half of £2.20 = £1.10 needs to change hands (from Ann to Dan)
£1.10 = 50p + 3$\times$30p $\rightarrow$ not OK because Ann has no 20p s to give to Dan
£1.10 = 3$\times$50p $-$ 2$\times$20p $\rightarrow$ 5 coins exchanged
Finding the total amount of money
In total, Ann and Dan have 180p + 400p = 580p, so they need to end up with 290p each. Therefore Dan needs to receive at least three 50p coins from Ann to have enough money. Then Ann has 250p, so she needs at least two 20p coins from Dan, at which point they have 290p each. Therefore, at least 5 coins must change hands.
Suppose Dan gives Ann $x$ $20$p coins and Ann gives Dan $y$ $50$p coins. Then Dan has $(180-20x+50y)$p and Ann has $(400-50y+20x)$p.
We need $180-20x+50y=400-50y+20x$, which is the same as $10y-4x=22$, that is $5y-2x=11$. The solution to this equation which minimises $x+y$ is $x=2$, $y=3$, so the smallest number of coins that must change hands is $5$.