Should I get a Letter of Rec from a Teacher or my counselor?

So the thing is that my sophomore year I had to travel out of country due to family and ended up doing bad in my classes and failing one. Our school makes it so you can only get 2 letters of rec. So should I get 2 letters of rec both from teachers or 1 from counselor explaining the situation and 1 from a teacher talking about my work ethic etc.

You have to get a counselor recommendation to fill out most applications, it’s not a choice.
My guess is your school has a limit on the number of teacher recs you can get, since most schools will require 1-2 teacher recs along with a counselor rec.