When querying data less than 7 days old, data.count and data.sum are always perfectly equal (for increment metrics from statsd).
However when querying a time period further in the past (E.g. last month; August 1 - August 2) or when querying a larger period until now (e.g. last 14 days), then these properties diverge. It even claims different values for the same time period.
For example:
[[ https://graphite.wikimedia.org/render/?from=-7days&until=-1h&target=legendValue(mw.js.deprecate.wgNamespaceNumber.%7Bcount%2Csum%7D%2C%22max%22)&width=500 | graphite: from=-7days&target=mw.js.deprecate.wgNamespaceNumber ]]
{F2532347}
[[ https://graphite.wikimedia.org/render/?from=-14days&until=-1h&target=legendValue(mw.js.deprecate.wgNamespaceNumber.%7Bcount%2Csum%7D%2C%22max%22)&width=500 | graphite: from=-14days&target=mw.js.deprecate.wgNamespaceNumber ]]
{F2532349}'
Note how the last 7 days of the "last 14 days" doesn't match the "last 7 days".