Theories given by differential equations give some clearcut examples.
The solutions are determined by boundary conditions. If the theory includes both the differential equations and the boundary conditions, the most obvious counterfactual is to keep the differential equations and change the boundary conditions to a different set of admissible boundary conditions. A simple example is provided by the equations of celestial mechanics regarding the planets as point masses. We can use the equations to predict the future of the system from the present but with Mars having a different position and velocity than it has at present. We can also solve the equations supposing a sudden change in the mass of Mars in this theory.