Added counting cache to attempt to reduce # of database hits