title: Counting number of files at a URL in XCode
body: <p>I need to count the number of files contained in a folder URL in XCode, to be able to know how many images I want to obtain and how many buttons I need to create in my screen.</p>
  
  <p>I have found some information about counting files in your offline directory, but have no idea how to do it for a URL.</p>
  
  <p>Here is an example that works for offline:</p>
  
  <pre><code>int numberOfFileInFolder = [[[NSFileManager defaultManager] contentsOfDirectoryAtPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"/Angry"] error:Nil] count];
  </code></pre>
  
  <p>I would like to do the same thing, but for a URL such as @"http://hello/images/".</p>