CMD equivalent of linux wc -l command within a call to FFPROBE?

  batch-file, cmd, ffmpeg, windows

This answer would solve a lot of my problems but relies on wc -l to tally the number of audio channels from the output of ffprobe.

How do I use ffmpeg to merge all audio streams (in a video file) into one audio channel?

I’m using a Windows batch file, so I need another way of accomplishing the following in CMD:

-filter_complex "[0:v]scale=w=1920:h=1080:force_original_aspect_ratio=1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2;[0:a]amerge=inputs=$(ffprobe -loglevel error -select_streams a -show_entries stream=codec_type -of csv=p=0 | wc -l),atempo=24000/24024"

Any help? My programming experience is minimal. This question seems like it’s asking the same thing, but I can’t seem to adapt its suggestions into the ffprobe call with the end result being it just returning a number.

What is the windows equivalent of Linux command wc -l?

Source: Windows Questions