1. This is a better fit for memcache than redis, since you can get the counts to expire automatically
2. If you are fetching paginated results with a LIMIT (and you usually are) then you can use the SQL_CALC_FOUND_ROWS prefix on your SELECT to get these counts for "free" from MySQL without needing to do your own caching (see http://dev.mysql.com/doc/refman/5.0/en/select.html )