add cache for counts