With the line as given, the correct wording for the printf function should leave out naming directories because they are not included in the search:
Code:
"The number of files in %s on %s \n"
If the number of directories is to be included, the search should include them with a logical or:
Code:
find /etc/ \( -type f -o -type d \) -print