add select_and_count in model