How to count frequency of words by using GNU/Linux tools

One way to count frequency of words in a file named stmtn10.txt:

tr -d [:punct:] < stmtn10.txt > 2.txt
tr [:upper:] [:lower:] < 2.txt > 3.txt
tr -d '\r' < 3.txt > 4.txt
tr ' ' '\n' < 4.txt > 5.txt
sort 5.txt > 6.txt
uniq -c 6.txt > freq.txt

GNU Free Documentation License

Copyright © 2020-11-28 22:54:05.794483+01 by Jean Louis. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”