It is clear to me what counterfactual is and how it works for binary variables. However, I'm confused about how it works for continuous variables. For example, we are trying to estimate the effect of car loan interest rate on car purchases. How would a counterfactual work here?
The Neymen-Rubin potential outcomes terminology is is not typically used in economics outside policy evaluation where your policy will be binary.
This being said there are still counterfactuals. For example, if you are regressing interested rate on car purchase, if at time $t$ interest rate $i$ was 6% and associated car sales $s$ were 500 of cars at dealerships $j$ then the set of all counterfactuals would be the amount of sales at dealership $j$ when interest rate would be anything else than $i\neq 6\%$. For example, if given that we observe $s=500,i=6\%$ we would be able to go back in time and change $i=7\%$ which would give us $s=400$, this alternative scenario would be one of the counterfactuals.
However, you can already see why this sort of terminology is less useful outside policy evaluation. With continuous variables there are whole sets of counterfactuals that could be infinitely large, if you have just one binary policy there is only a single counterfactuals what would happen if the policy did not get implemented. If you are using continuous variables every other possible value for regressor will create some possible counterfactual.