I believe the number of medals returned is a percentage of the stars you have lost upgrading prior.
I got over 150 blue and 110 purple medals returned.