Abstract
Philosophical theories of counterfactuals have had relatively little to say about counterfactual reasoning in mathematics. Partly this is because most mathematical counterfactuals seem also to be counterpossibles, in that their antecedents deny some necessary truth. In this chapter, I delineate several different categories of mathematical counterfactual (or “countermathematical”) and then examine in detail a case study from mathematical practice that features counterfactual reasoning about “spoof perfect” numbers. I argue that reasoning about spoof perfect numbers presents both a challenge to philosophical analyses of counterfactuals and a resource for thinking more productively about the role of counterfactual reasoning in mathematics.