Have you really added the line I proposed to your script? Rather than trying to find hidden files or such?
In reply to Re^3: count file in directory by hdb in thread count file in directory by joaase