In my LG battle above, my remaining apparitions were 52 due to regeneration from enemy creatures' mana points. But the final result counted it as 32 and charged me more resurrection money for some reason. This seems to be a bug.
With any healing type set up, whether appas in this case or perhaps more commonly vampires, when calculating resurrection, it is based upon the lowest troop count they have had in the battle. There are similar dynamics when calculating the amount of exp and FSP you get on a battle where you lose and troops are regenerated. It only counts the maximum dead at any one point, not the cumulative total.