dir /s *.jpg | find /v /c ""
/s 递归
find: A command used to search for a text string in a file or input.
/c: Displays only the count of lines that contain the string.
/v: Displays all lines NOT containing the specified string. When used with an empty string (""), it matches every line since every line does not contain an empty string.
Therefore, find /c /v "" counts every line of the input it receives.