The following is some example that you can use. The script is not supported by ITRS and user is responsible on writing their own script:
echo "name, value"
echo "count,"`echo $(($(ls -l | grep -v ^d | wc -l)-1))`
For Windows (for drive other that C: ):
CD /D D:\your_folder
for %%x in (*) do set /a count+=1
Enable the wildcardMonitorAllMatches setting on the FKM's advanced tab.
Caveat: this will also include the directories on the specified path.