<p>Please help me with a sanity check. Assuming a many-to-many relationship:</p>

<p><a href="http://www.codingthewheel.com/pics/many_to_many.gif" rel="nofollow noreferrer">Post, PostTagAssoc, Tag http://www.codingthewheel.com/pics/many_to_many.gif</a></p>

<p>What's the most succinct way (using LINQ to SQL) to get a result set showing, for <strong>each</strong> tag (or post), the aggregate number of posts (or tags) assigned to it?</p>

<p>Thanks!</p>

```
```
from pta in db.PostTagAssoc
 group pta by pta.PostID into t
 select new {PostID = t.Key, TagCount=t.Count()}
```
```