During a school survey, the teacher mistakenly counts some students twice and misses some others. If the teacher double-counts 5 students and misses 4 students, and he thinks he counted 42 students in total, how many students are there really? Let's think step by step and output the final answer within \boxed{}.
user