Your save file can be adorned by as many as five stars, provided you meet the corresponding requirements (as indicated below).
Beat world 6
Gather all star coins in worlds 1-6, plus the Mushroom World and Flower World
Gather all moon coins in the Star World
Access all of the game's alternate paths (including those you must pay to unlock)
Obtain 1110 lives, which appears as three crowns
Don't use the golden leaf (which appears if you die within a stage too often) or you won't get to enjoy sparkling stars and that would be sad indeed.