title: Count number of child nodes for specific XML Node c#
body: <p>I want to iterate through this XML-file (XmlDocument) and count the number of subnodes each Employee Element have. I want to Iterate through Employee with ID 1, count the number of sub nodes and then save it to a HashSet with the Employee ID as key, and the amount of sub nodes as value. My problem is, how can I map each Employee with the Employee ID value?</p>
  
  <p>XML File: </p>
  
  <pre><code>&lt;Workers&gt;
      &lt;Employee&gt;
              &lt;Employee_Summary&gt;
                  &lt;Employee_ID&gt;1&lt;/Employee_ID&gt;
                  &lt;Name&gt;Name &lt;/Name&gt;
                  &lt;Company_Code&gt;Company Code&lt;/Company_Code&gt;
                  &lt;Unit_Code&gt;Unit Code&lt;/Unit_Code&gt;
              &lt;/Employee_Summary&gt;
              &lt;Company_Summary&gt;
                  &lt;Company_Name&gt; Company Name&lt;/Company_Name&gt;
                  &lt;Company_Adress&gt; Company Adress &lt;/Company_Adress&gt;
                  &lt;Company_Status&gt; Company Status &lt;Company_Status&gt;
              &lt;/Company_Summary&gt;
      &lt;/Employee&gt;
  
      &lt;Employee&gt;
              &lt;Employee_Summary&gt;
                  &lt;Employee_ID&gt;2&lt;/Employee_ID&gt;
                  &lt;Name&gt;Name &lt;/Name&gt;
                  &lt;Company_Code&gt;Company Code&lt;/Company_Code&gt;
                  &lt;Unit_Code&gt;Unit Code&lt;/Unit_Code&gt;
              &lt;/Employee_Summary&gt;
              &lt;Company_Summary&gt;
                  &lt;Company_Name&gt; Company Name&lt;/Company_Name&gt;
              &lt;/Company_Summary&gt;
      &lt;/Employee&gt;
  
  
      &lt;Employee&gt;
              &lt;Employee_Summary&gt;
                  &lt;Employee_ID&gt;3&lt;/Employee_ID&gt;
                  &lt;Name&gt;Name &lt;/Name&gt;
                  &lt;Unit_Code&gt;Unit Code&lt;/Unit_Code&gt;
              &lt;/Employee_Summary&gt;
              &lt;Company_Summary&gt;
                  &lt;Company_Name&gt; Company Name&lt;/Company_Name&gt;
                  &lt;Company_Adress&gt; Company Adress &lt;/Company_Adress&gt;
                  &lt;Company_Status&gt; Company Status &lt;Company_Status&gt;
              &lt;/Company_Summary&gt;
      &lt;/Employee&gt;
  &lt;/Workers&gt;
  </code></pre>