Ristar is one of the hidden extras in Sonic Mega Collection, and the unlock condition is deliberately steep: you have to beat every game in the collection 50 times.
That's a serious commitment given how many titles are included, which is why most players never see it. The counter tracks completions across the whole set rather than per game, so chipping away at it steadily is more realistic than trying to clear it in one sitting.