One interesting aspect of collecting coins in a platformer like mario: it makes the level stateful. You can see if you've been somewhere before based on whether there are coins present.