A bit more progress on count-coins function