Notice the hint on top of the door. It says “S-B”. This means you have to count the numbers of the objects and arrange them from Smallest to Biggest. So the order will go like this:
1st = Eyes = 12nd = Pears = 53rd = Basketballs = 24th = Stars = 3
Change the numbers on top of the door to 1523 to reveal the key. Use it to exit this level.