title: Count specific XML Nodes within XML
body: <p>See this XML:</p>
  
  <hr>
  
  <pre><code>&lt;CMP&gt;
      &lt;OMP3&gt;
          &lt;personmenu&gt;
              &lt;submenuid&gt;502&lt;/submenuid&gt;
              &lt;submenuid&gt;503&lt;/submenuid&gt;
          &lt;/personmenu&gt;
          &lt;accountsmenu&gt;
              &lt;submenuid&gt;517&lt;/submenuid&gt;
              &lt;submenuid&gt;518&lt;/submenuid&gt;
              &lt;submenuid&gt;519&lt;/submenuid&gt;
          &lt;/accountsmenu&gt;
  
          &lt;reportsmenu&gt;
              &lt;submenuid&gt;522&lt;/submenuid&gt;
              &lt;submenuid&gt;528&lt;/submenuid&gt;
              &lt;submenuid&gt;536&lt;/submenuid&gt;
          &lt;/reportsmenu&gt;
      &lt;/OMP3&gt;
  
      &lt;AMP3&gt;
          &lt;admissionmenu&gt;
              &lt;submenuid&gt;702&lt;/submenuid&gt;
              &lt;submenuid&gt;703&lt;/submenuid&gt;
          &lt;/admissionmenu&gt;
      &lt;/AMP3&gt;
  &lt;/CMP&gt;
  </code></pre>
  
  <hr>
  
  <p>I want to get the total count of  nodes from this xml dynamically (C#).
  How can I do it? Any sample code?</p>