server to do counting