Improves Rails Active::Record count() performance using caching