A counterfactual is a truth claim about how the world would be if some state of affairs held.
If we use possible-worlds language, the counterfactual form 'if p were, then q' might be presented as: in every possible world where p, q. However, this bears poking. In ordinary conversation, counterfactuals are not so broad as to apply to all possible worlds. Rather, 'if p were, then q' may be interpreted as: in the nearest possible worlds where p, q. One might interpret counterfactuals as covering a spectrum, some being of the broadest form, as the first analysis presented it, others in the narrowest, as the second, and others as: in all possible worlds relatively close to this one, if p, then q.
Now, occasionally we use counterfactual questions like "If God did not exist, could there be truths of ethics?" This is a yes/no question, where the correct answer depends on the truth value of the counterfactual. If God is a necessary being, however, then there are no possible worlds where the antecedent is true, and so, in all possible worlds, whether or not ethics requires God's existence, the counterfactual holds good.
Nevertheless, such counterfactuals seem useful to inquiring as to how reality depends on God. In the realm of inquiry, however, we are not dealing with metaphysical realities, but with epistemological realities. We can then present the counterfactual in terms of what we would need to believe if the antecedent were true. Thus, 'if p were, then q' in the epistemological sense, means that where one believes p, one must also accept q. Here the problem arises that it is difficult to say whether such counterfactuals are true or not. If I accepted that God did not exist, I suspect I would still accept that there are ethical truths, even if I do not now accept that the ethical truths which do exist could exist if God did not. The change in views would require multiple changes in my views.
Instead, let us suppose that the question of 'if not-p were, then q' may be taken, in certain contexts, as a kind of bracketing, that is, it is a question of what supports remain to q when p is taken away. This requires, in the case where God's existence is the value for p, that we presume that something is left over. Even granting that all of reality depends on God for its existence, we may distinguish between how it is supported immediately by God's power and mediately, that is, by other things in reality. Thus, for instance, I am inclined to think that ethical realities are given by realities of how human beings work in interaction with the world, and so ethics has support other than immediate divine decree.
This is how we use the counterfactual as regards God's existence, I think. It is used to bracket God's existence, by itself, and leaves behind those aspects of reality which do not immediately require God's existence.
Problems rise again, here, however. Does the world require God's existence? I suppose so, yet I would assume we want to leave it behind when we bracket God. Some items may have their being in God (e.g., numbers and other universals are sometimes viewed this way).
What is involved in bracketing God in this way, then? We set aside truths whose validity we could not know without also knowing that God exists. Thus, we know the external world through our senses, other minds through our knowledge of the external world, numbers through mathematics, etc., but we leave off revealed truths and truths which we cannot argue for without arguing for the existence of God either equivalently or on the way.