Line counting in Windows batch files

In Linux the wc -l command gives a count of the number of lines in a file or pipe. Windows doesn’t have the wc command, but the same can be done using the built-in find command as follows:

1find /C /V ""