Issue #1201762 by mikeryan, marvil07: Implemented built-in caching for source counts, and flag to enable it