title: Count files matching a pattern with GREP
body: <p>I am on a windows server, and have installed GREP for win.  I need to count the number of file names that match (or do not match) a specific pattern.  I don't really need all the filenames listed out, I just need a total count of how many matched.  The tree structure that I will be searching is fairly large, so I'd like to conserve as much processing as possible.</p>
  
  <p>I'm not very familiar with grep, but it looks like i can use the -l option to search for file names matching a given pattern.  So, for example, I could use</p>
  
  <pre><code>$grep -l -r this *.doc*
  </code></pre>
  
  <p>to search for all MS word files in the current folder and all child folders.  This would then return to me a listing of all those files.  i don't want the listing, i just want a count of how many it found.  Is this possible with GREP...or another tool?</p>
  
  <p>thanks!</p>