Your requested function is "Summarize" - see it over here: http://graphite.readthedocs.org/en/latest/functions.html
In order to the totals over time just use the summarize functions with the "alignToFrom = true". For example: You can use the following metric for 1 day period: summarize(stats_counts.your.metrics.path,"1d","sum",true)
See graphite summarize datapoints for more details.