I often use this technique in small data-munging scripts. It is a fast variant of the Guttman Rosler Transform, and shares these limitations with GRT:
You must know the maximum size of each data element. For example, if the count is more than 5 digits, then the keys will not align, and the sort will be wrong.
You cannot use it to mix ascending and descending sorts. For example, tilly sorted the count descending, but section and item ascending. GRT can't do that.
For the first, instead of using sprintf "%05d", $int, you can use pack "N", $int (for any positive integers that fit in a long) or even sprintf "%02d-%d", length(0+$int), $int (for positive integers of 99 digits or fewer!).