The candy itself is rarely the hard part. The nightly negotiation over how much of it is allowed is.
A rule announced after sorting has already started has already lost. Say the plan on the walk home, before anyone has seen what is in the bag: a fixed number of pieces a day, chosen by them from what they collected.
Sorting by colour, by type, by favourite-to-least-favourite is a genuinely satisfying task for a five- or six-year-old, and it gives them a real sense of what they have, rather than a bag they keep dipping into blind.
Some families trade the surplus for one bigger toy once the pile is sorted. Others let it run out at the agreed daily rate over a couple of weeks. Either works — what matters is that the ending was decided in advance, not fought over as the bag empties.
That is a question for your own household and, if you want a specific number, your paediatrician — that is not a figure we are going to hand out.
Decide it stays separate before the bags are even opened. Trading is fine if both sides choose it; splitting one child's stash to solve another's impatience usually costs more than it buys.
Part of our guide to Holiday hosting with kids.