title: Count Number of Files with Extension in iPhone Documents
body: <p>I can think of ways to do this with taking the array:</p>
  
  <pre><code>NSArray *doc_contents = [fileManager contentsOfDirectoryAtPath:documentsDirectory error:nil];
  </code></pre>
  
  <p>and doing string parsing to find the extension, but that seems like a roundabout way of doing this. Is there a cut and dry way to count the number of .jpg files in my iPhone app documents directory?</p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT</strong> Solved here: <a href="https://stackoverflow.com/questions/7447277/creating-an-array-from-documentsdirectory-includes-ends-with-mov">Creating an array from documentsDirectory includes ends with .MOV</a></p>