title: SharePoint Designer Data View- XSLT Count
body: <p>I am working with a data view web part in SPD 2010.  My xml structure is as follows:</p>
  
  <pre><code>&lt;ProjectGroups&gt;
      &lt;ProjectGroup&gt;
          &lt;GroupID&gt;1&lt;/GroupID&gt;
          &lt;ProjectName&gt;Project 1&lt;/ProjectName&gt;
      &lt;/ProjectGroup&gt;
      &lt;ProjectGroup&gt;
          &lt;GroupID&gt;2&lt;/GroupID&gt;
          &lt;ProjectName&gt;Project 2&lt;/ProjectName&gt;
      &lt;/ProjectGroup&gt;
      &lt;ProjectGroup&gt;
          &lt;GroupID&gt;2&lt;/GroupID&gt;
          &lt;ProjectName&gt;Project 3&lt;/ProjectName&gt;
      &lt;/ProjectGroup&gt;
      &lt;/ProjectGroups&gt;
  </code></pre>
  
  <p>This is a rollup web part, so what I am looking to do is get a count of Projects under each Project group.  For my example above, Group ID 1 has 1 project, Group ID 2 has 2.  I am sure there's a way to do this, but I'm sort of learning xslt on the fly, so I'm not sure exactly what to do.  Any help is appreciated.  Thanks.</p>