count_all issue with join