separate count requests from main function