title: Get number of folders in root of ZipFile
body: <p>I'm trying to check if my zip is <em>valid</em>. </p>
  
  <p>The zip file looks like this (only one root folder with content):  </p>
  
  <pre><code>zip-root
  `-- folder1
      |-- folder1
      |-- folder2
      |-- folder3
      |-- folder4
      `-- folder5
  </code></pre>
  
  <p>The structure of the zip file is considered <em>invalid</em> if</p>
  
  <ul>
  <li>root of zip contains more than one <strong>folder</strong></li>
  </ul>
  
  <p>I tried the following:</p>
  
  <pre><code>using (ZipArchive archive = ZipFile.OpenRead(ZipFilePath))
  {
      rootArchiveFolder = archive.Entries.Count();        
  }
  </code></pre>
  
  <p>but this returns the count of all folders, whereas I'm only interested in the <em>root-folder-count</em></p>