Use sync/atomic instead of mutex to protect counter
Reorganise package and example