Added the counter example code.

This isn't fully operational, but it will be soon.