Add function to sort tag totals