Count things over periods of time in a manner slightly inspired by RRDtool