Implemented the counter example with the registry