( sort {$b->{'count'} cmp $a->{'count'} ) or $b->{'type'} cmp $a->{'type'}} @data