I'd assume summing each individual region score. Where each region score is probably: {activityXcom - activityAlien}. Possibly amended with researchScore after the summation.
I'm not sure if county score is already part of the region score for the purpose of determining the final score
note:
Based on contents of save file, not on code knowledge. One of the main devs can enlighten us (or you can do a code dive).