Refactor nm-async-count