Albeit the Schwarzian transform is a clever solution, user-programmers can suffer from the rule that ready-made solutions are apt to break at the slightest deviation from the requirement they originally met. I am not saying this is a particularly flagrant case, but as a rule, instead of hacking away at a not-quite-fitting algorithm, it might be an idea to try to construct the solution more directly from the actual requirement, e.g.:
my %count;
my @ulist = sort { ($count{ $b } ||= TabCount( $b ) )
<=>
($count{ $a } ||= TabCount( $a ) )
} values %unk;
sub TabCount {
$_ = shift;
s/\s+$//;
my @split = split /\t/;
return $#split;
}