title: The fastest way to count the number of files in a directory (including subdirectories)
body: <p>I'm running a script that looks at all the files in a directory and its subdirectories.</p>
  
  <p>The script has been running for a day, and I'd like to estimate how long it will keep running. I know how many files it processed so far (73,000,000), but I don't know the total number of files.</p>
  
  <p>What is the fastest way to count the files?</p>
  
  <p>I tried right-clicking on the directory and selecting "properties", and it's slowly counting up.
  I tried redirecting ls into a file, and it's just churning &amp; churning...</p>
  
  <p>Should I write a program in c?</p>