Well, a punishing way could be to have a global array that only stores if each level has been visited, then if it has it removes all bonuses.
Otherwise, the global array object will need to store every coin for every level, then remove them as the player collects them.
Hmm, or you can use the INI object to store this to a save file, that works too.