You're sitting at a red light, waiting to make a left into the grocery store parking lot. A green arrow appears, and you ease into the intersection. Screeching brakes pierce the silence---a red SUV is hurtling toward you through a red light. You mash the accelerator and your vehicle darts forward, narrowly missing the oncoming SUV. The driver speeds away.

As you safely pull into the parking lot, what goes through your mind?

A basic tool in the human "cognitive toolkit" is what's called counterfactual thinking: the ability to imagine a different reality than the current one. If you think about it, counterfactual thinking is incredibly important---it's what allows us to set goals and achieve them, to delay gratification, and to make a hundred little decisions throughout the day that (we hope) move us toward a slightly better tomorrow. It's part of what makes us human.

After a significant event---like narrowly avoiding getting t-boned by a speeding SUV---we're likely to engage in counterfactual thinking. We either think about how much worse things could be (this is called downward counterfactual thinking) or how much better (upward counterfactual thinking).

In The Paradox of Choice, psychologist Barry Schwartz writes that while we regularly engage in upward counterfactual thinking (daydreaming about better circumstances), downward counterfactual thinking is less common yet more psychologically healthy. Schwartz writes, "while upward counterfactual thinking may inspire us to do better the next time, downward counterfactual thinking may induce us to be grateful for how well we did this time."

Downward counterfactual thinking is a form of gratitude, really. It's being thankful for what we have instead of pining for more. And it's a powerful thinking habit we can develop, if we wish.

As you steady your nerves and pull into a parking spot, you feel some anger toward the driver of the red SUV. Stepping out into the sunlight, though, you take a deep breath of fresh, clean air and try to dwell on a different thought: how lucky you are to be alive.