Renames ticket_count for counter cache and fixes that in multiple files