A recount is unlikely to change anything, given that the people responsible for rigging the election in the first place will be recounting. I see the following outcomes as possible:
1. Khamenei abandons Ahmedinejad (blaming him for irregularities and probably ordering a re-election)
2. The IRGC switch sides (forcing a re-election or deposing Khamenei)
3. The regime waits for protests to die down, gets rid of reformists (students and rival elites) when no one is watching
The latter is much more likely, in my view, because Khamanei, if he’s still in charge, is tied to the decision he’s already announced. Backing down could encourage the protesters. If he’s not in charge, and AN’s faction has taken over, then he won’t back down either, because he isn’t allowed to. The IRGC won’t switch sides, because AN represents their interests. That’s why he’s in power. If enough of a critical mass of support develops for the opposition, then the IRGC, the mullahs, and indeed anyone who wants to back the winning horse, could switch sides. But sufficient momentum is needed to break from this equilibrium. After all, the regime has been in power for three decades for a reason.