Add check for visit count query in logic without count-visits-max set.