Add tallying functions for total and aggregate by day.