Take the following models:

A Question (like, a stack question!)

```
Question {
    _id : ObjectId(123),
    Question : "MongoDB: Count number of referenced items",
    Tags : [ObjectId(1), ObjectId(2), ObjectId(3)] 
}

```

A table of tags

```
Tag{
    _id : ObjectId(1),
    tag : "MongoDB",
    description : "stuff"
},
{
 .... more tags
}

```

I would like to list all the tags, and next to each tag show a count of how many times that tag is used. You can then click on the tag to edit it, like so:

```
MongoDB (1232)
C# (23232)

```

Whats the most robust way to do this. I have investigated the following.

1. Aggregation framework. 
This enables me to get a count of how many times the ObjectId appeared in the Question table, but I have no easy way of getting the name of the tag. I guess I would have to do another database call, get all the tags then map them together.
2. Have a COUNT on the tags table, and every time I submit a question check to see if a tag has been added or removed then increment or decrement this counter. I cant seem to get my brain to accept this is a good way to do this.

[Edit - see comments]

1. Store tag names in the question. Use tag name is Id. This would allow #1 to work a better. Tag names May change however, so i guess this has knock-on effects.

Which of these would people recommend (and why). Are there any strategies I have missed?

I am using the mongo driver for C#