example/counter: atomic instruction version