[#39968465] implemented counter cache on tags and updated method for migration to reset counter cache