uniqcount does almost the same as "sort ... |uniq -c" but much faster. On a sampel file sort|uniq took 35 seconds while uniqcount took 1.7s

In case-insensitive mode it also preserves the casing which "tr '[:lower:]' '[:upper:]' |sort |uniq -c" doesn't.


============== Manual ==============
NAME
    uniqcount
SYNOPSIS
    uniqcount [-i] [-s separator]
DESCRIPTION
    uniqcount counts the occurrences of each input line read from standard
    input, and outputs the lines followed by a count.
OPTIONS
    -i            Ignore case. Defautl is case-sensitive.
    -s separator  Specify a separator character. Default is a tab.
OUTPUT
    The output is generated for each unique input line:
        <count> <separator> <text>
    The order of the lines is not preserved.
RETURN CODES
    uniqcount returns 0 on success, 99 on usage error, and 1 on out-of-memory
EXAMPLES
    cat a_file.txt | uniqcount
ENVIRONMENT
    If case-insensitive counting is used then uniqcount is subject to the
    current locale.
SEE ALSO
     tr(1), wc(1), awk(1), sort(1)