If you want to know how many files exist in a certain directory including all files of subdirectories, you can use this function. There is one exception. It will omit the system restricted file which can not be accessed. Recursively call itself to calculate subdirectories.