If you have R, you can use:
> ... | Rscript -e 'print(sum(scan("stdin")));'
Read 4 items
[1] 2232320
Since I'm comfortable with R, I actually have several aliases for things like this so I can use them in bash
without having to remember this syntax. For instance:
alias Rsum=$'Rscript -e \'print(sum(scan("stdin")));\''
which let's me do
> ... | Rsum
Read 4 items
[1] 2232320
Inspiration: Is there a way to get the min, max, median, and average of a list of numbers in a single command?