fixed total count detection when results has zero items