perl -anle '$w{lc s/[[:punct:]]//r}++ foreach @F; END{print map{"$w{$_} $_ \n"} (sort{$w{$a} <=> $w{$b}} keys(%w))}'
https://perlmaven.com/count-words-in-text-using-perl
Throw in some needless array-referencing-and-dereferencing so people can rightfully consider perl a write-only language...