sum (n.) Look up sum at Dictionary.com
c. 1300, summe, "quantity or amount of money," from Anglo-French and Old French summe, somme "amount, total; collection; essential point; summing up, conclusion" (13c., Modern French somme), from Latin summa "the top, summit; chief place, highest rank; main thing, chief point, essence, gist; an amount (of money)," noun use (via phrases such as summa pars, summa res) of fem. of summus "highest, uppermost," from PIE *sup-mos-, from root *uper "over" (see super-).

The sense development from "highest" to "total number, the whole" probably is via the Roman custom of adding up a stack of figures from the bottom and writing the sum at the top, rather than at the bottom as now (compare the bottom line).

General sense of "numerical quantity" of anything, "a total number" is from late 14c. Meaning "essence of a writing or speech" also is attested from mid-14c. Meaning "aggregate of two or more numbers" is from early 15c.; sense of "arithmetical problem to be solved" is from 1803. Sum-total is attested from late 14c., from Medieval Latin summa totalis.
sum (v.) Look up sum at Dictionary.com
early 14c., "to count, count up, calculate, reckon," from Old French sommer "to count, add up," or directly from Medieval Latin summare, from summa (see sum (n.)). Meaning "briefly state the substance of" is first recorded 1620s (since c. 1700 usually with up). Related: Summed; summing.