Didn't even have to fire up Vi today
sort | uniq -c | sort -nr | { head -3; tail -3;} | sed 's/.* //' | paste -sd'**\n' | bc