`wc` is a standard POSIX command that counts words, lines, and characters.
The wc utility reads one more files (or the standard input) and writes the number of lines, words, and characters to the standard output. If more than one file is given, then the total number of lines, words, and characters across all inputs will also be printed. There are also switches for controlling what parts should be counted.
Some versions of wc can differentiate between characters (which may be multi-byte depending on the encoding) and bytes.
References: