How to add up rows in a view?
Have you tried the Views Calc module? I think you will get what you want from it. Here is an excerpt about it from the module's project page:

... adds simple calculations to a views table. Requires the Views module.
You can SUM, AVERAGE, COUNT, MIN, MAX, or AVG selected columns. A plug in theme makes the view look more spreadsheet-like (right justifies numeric fields, shades calculated columns and rows, and underlines calculated rows).