It counts up the amount of times the button has been pressed, and displays it in binary on the LEDs.
It goes as high as 15, which is as high as you can count with 4 digits in binary, then resets to zero.
This is as far as I can go with this particular setup with the pieces I have - it uses all my capacitors and jumpers (I even have to use the capacitor for the button to bridge over from the positive channel on the breadboard because I was out of jumpers). Guess this means I need to pick up more capacitors and jumpers (and probably LEDs while I'm at it).
Diagrams made in Fritzing.