Fixes #7247 - Add migration & rake task to correct corrupt cached counters