@echo off
set count=0
for /f "delims=" %%i in ('dir /s /b *.fem') do (
  set /a "count=count+1"
)
echo Number of fem files in the folder = %count%
pause
exit 0

Output:

Number of fem files in the folder = 20
Press any key to continue . . .