Different aggregation result when filtering just one term

The doc count is the size of the document set considered.
The sum aggregation (and all other metric aggs) only operate on the docs in this set. If you're not considering all the docs your metrics will also be off.