Counter-factual reasoning, or logic, is reasoning that is "counter to fact" and is one of the basic ways in which humans reason and is part of the field called "casual reasoning".
Human beings tend to reason using counter-factual (counter to fact, or what if) logic, as pointed out by famous computer scientist Judea Pearl.