Answer:
This is an example of an idiom
Step-by-step explanation:
An idiom is a saying that doesn't mean what it's literally saying
So basically what I'm saying is that the quote isn't telling you to count your lucky stars.
The literal meaning is to express thankfulness or gratitude for one's good luck while avoiding a bad situation.