There are two typical ways to show the total of records shown in an unfiltered portal:
Sum in the layout's table can sum the total field in the portal's table.
A summary field in the portal's table that totals the Total field can be placed on the layout outside of the portal and it will also show the same total.
And if this is a filtered portal, you can put a one row copy of the filtered portal below the first portal and put the same summary field inside that one row filtered portal to show the correct portal total.
Thank you PhilModJunk. That answers my question.
Any clue why the developer preferred the SQL solution?
ExecuteSQL has it's own mix of strengths and weaknesses. One of it's weaknesses is that it's cryptic and you have to learn SQL syntax to figure out what a given query is set up to do.
I might hazard a guess if I looked at the actual file (I just provided the standard methods for getting a total), but I didn't actually examine the file.