Software >> OS >> Windows >> Command Line >> How to count number of lines from command output in command prompt (cmd)

pipe it to    | find /C

or to exclude blank lines pipe it to | find /c /v ""

example

netstat -an | findstr ESTAB | find /c /v ""