Issue #3190804 by DamienMcKenna, Wim Leers: Allow source counts to be cached: implement ::doCount() instead of ::count().