updated counter example to use new API