refactor .count by .empty