First version

- add counter function
- mutex