Added tests for count api

testDateRangeInQueryString awaits fix (#3625)