MySQL already caches these. You've added a cache on top of a cache. Is a round trip to the database so slow?
On innodb, because of transactions, this is not possible, and it needs to actually count the rows.
BUT, the query itself is still cached - at least until the underlying table gets updated, which invalidates the cache (I'm not sure of the exact invalidation strategy, but it's part of MySQL and doesn't depend on the engine).