I think counterfactuals are cool, not because of their importance in post-Fact, Fiction, and Forecast analytic philosophy, but because of the role they play in everyday cognition. Counterfactuals figure in guilt and regret, blame-attribution, ordinary causal reasoning, scientific reasoning (including in the structure of scientific experiments and hypothesis testing in general) and all sorts of other things. There are even implications for mental health. For instance, depressed individuals tend to use more counterfactuals, and in particular, more counterfactuals for "controllable" events1. As interesting and widespread as they are, though, counterfactuals haven't been widely studied by psychologists outside of social psychology.
One could easily launch an inquiry into how people produce, understand, and use counterfactuals by attempting to address Nelson Goodman's two major questions about counterfactuals: what are the conditions that hold in the counterfactual scenario (in simple counterfactuals, stated as "if-then" hypotheticals, the question is about what conditions hold in the antecedent), and how do we determine whether, given the counterfactual scenario (e.g., in the antecedent), the resulting inferences (e.g., in the consequent) are true? Since people are able to produce, understand, and use counterfactuals fairly easily, and even to judge whether they are true, it's important to understand how they do this. In fact, because people use counterfactuals to reason about such a wide variety of things, understanding the cognitive mechanisms underlying counterfactuals is likely to provide insight into many other mental phenomena.
As far as I know, there's only one comprehensive theory of counterfactuals in cognitive science. It comes from Gilles Fauconnier (in Mappings in Language and Thought and Mental Spaces). Naturally, his account involves blending. In essence, the blend results from a combination of the counterfactual space and the factual space, along with added inferences and the like. As is usually the case with blending, this sort of approach to counterfactuals is fun but not terribly productive. Still, I think the insight that the way we form and understand counterfactuals involves mapping is important.
One way to gain insight into how counterfactuals work, cognitively, is to look at the sort of differences that ordinary counterfactuals produce. As I've said before, differences are important, and there are two primary types of differences: alignable and nonalignable differences (see the link for an explanation of what these are). I suspect that a careful look at counterfactuals will show that the differences highlighted by the antecedents are alignable ones. In other words, counterfactual scenarios are likely to differ from their corresponding factual scenarios on dimensions that are relevant in our representations of the factual scenarios. This would provide a straightforward explanation for how people know which conditions should hold in the counterfactual scenarios. All they have to do is look at the condition(s) specified by the antecedent, map that onto the factual condition(s) with which the antecedent contrasts, and mutate the arguments.
To see how this world work, consider the following counterfactual: "If I had not stepped off the curb, I would not have twisted my ankle." If we map the condition in the antecedent (which specifies that I had not stepped off the curb) onto the factual condition (I had stepped off the curb), we can then carry over the structure of the resulting factual scenario (landed awkwardly, twisted ankle), and mutate each relevant dimension. Thus, I did not land awkwardly, and therefore did not twist my ankle. Philosophers might quibble over this, perhaps arguing that in some possible worlds, instead of stepping off the cliff, I stepped on a briefcase that a passerby had dropped, and ended up turning my ankle anyway, but that's because philosophers don't care about pragmatics. The context of the counterfactual likely constrains the types of inferences we can make, pragmatically, and the dropped briefcase is probably not a very good inference. Why? Because it's not alignable with anything in the factual scenario (that we know about). There was no briefcase, and creating a random nonalignable difference like that is just not the sort of thing we ordinarily do.
This account would also provide an answer to the question of how people determine the truth of counterfactual inferences. All they have to do is re-align the now fully-structured counterfactual domain with the factual one, and use their background knowledge to determine whether the mutations they've made make sense. For instance, in the ankle-twisting example, people can surmise that if I had not stepped off the curb, and thus had not landed awkwardly, it's unlikely I would have twisted their ankle. Landing normally rarely causes twisted ankles.
Obviously, this is a pretty sketchy cognitive theory of counterfactuals, and it certainly hasn't been tested empirically. I'm not quite sure how to go about testing it, though I've got some ideas. Perhaps someone who happens by here and has read this far has some suggestions. Or better yet, perhaps someone has some criticisms of this account (preferably logical or empirical ones). I do think that once its fully fleshed out, and if it stands up to empirical tests, it can be a powerful theory of counterfactual reasoning, and that makes it worth further attention in my mind.
1Markman, K. D., & Weary, G. (1998). Control motivation, depression, and counterfactual thought. In M. Kofta, G. Weary, & G. Sedak (Eds.), Personal control in action: Cognitive and motivational mechanisms (pp. 363-390). New York: Plenum Press.