Fixes #5692 - correct counts in cached_counters
Fixes #7247 - Add migration and rake task to correct corrupted cached counters
Fixes #746 - Generate all the Host template when click on Build to avoid errors during installation.