Political scientist here, but I have debated this topic with historian friends of mine. We still don't generally see eye to eye on it, but here is how I see counterfactuals.
First, there is an implicit counterfactual in most of the work that we see in history, even if the scholars doing it do not acknowledge it. Any time you make a causal argument (x caused y), you are implying that y may have turned out differently if x had been different. For example, if you were to argue that Soviet retrenchment in Eastern Europe was caused by Gorbechev's New Thinking on foreign policy, then you are implying that the retrenchment would have been different or nonexistent if the New Thinking had not occurred. This implicit counterfactual exists regardless of which causal framework you are working in (probabilistic or necessary and sufficient conditions). Since causal arguments are very much an important part of historical scholarship, I am of the opinion that historians should understand the logic of counterfactuals rather than hide from the fact that they are using them.
Having said that, I think that you are referring to the more explicit type of counterfactual, one that actually analyzes how events may have played out if the initial set of conditions had been different. These run into an issue known as the "fundamental problem of causal inference". Since you can only observe one reality, you can never actually test a counterfactual argument. Any of the "what if" histories will run into this issue, though they can still be interesting as a thought experiment. About a year back, I did see an interesting talk on a possible way to get around this problem, but it involved standards that are unrealistically high for most real-world scholarship. Other than that, I don't know any ways to get around this fundamental problem, but I would be interested if people up to date with the latest developments in historical scholarship have some ideas.