Added countAsync and various unit tests for async actions.