My usual approach is to use batch (or shell script) files to do such tasks. You could also do a Python script with similar functionality.
I would get the file count from the DIR command with the recursive option. For example:
${output} = Run DIR /S ${sourcepath}
(Then process the output getting the filecount.)
C:\>dir /s windows
(...)
Total files listed:
1840 files 385,129,355 bytes
1528 directories 983,191,552 bytes free
Note the Run command implies using: Library OperatingSystem
Hélio