It's a special mini-game for Charm duplicates. Each time you collect a duplicate, the bottom bar will fill up.
When you get a Charm, check out how many stars it has - that's how many will be added to the counter.