Use a counter instead of a target value.

Closes #15.