If there are two $5$p pieces, this gives one way.
If there is one $5$p piece, then there are two $2$p coins, one $2$p coin or no $2$p coins, with all the other coins as $1$p coins.
If there are no $5$p coins, there are between $0$ and $5$ coins that are $2$p, and all the rest are $1$p.
Therefore there are $1+3+6=10$ ways to give change.
This problem is taken from the UKMT Mathematical Challenges.