my @sorted_phrases = sort { $b->{count} <=> $a->{count} or $b->{sort_number} <=> $a->{sort_number} } values %$strings;