Sort countries merging details in the footer