I defined data model like this:

```
import mongoose from 'mongoose';

const schema = mongoose.Schema({
    title: {type: String, required: true},
    content: {type: String, required: true},
    language: {type: String, required: true},
    label: [{type: String, required: false}],
    createTime: {type: Date, default: Date.now},
    updateTime: {type: Date, default: Date.now}
});

const Snippet = mongoose.model('Snippet', schema, 'snippet');

export default Snippet;

```

What I want is that when I using:

```
Snippet.aggregate({...})

```

And if the data is:

```
[{
    title: 'a',
    content: 'b',
    language: 'javascript'
},{
    title: 'a',
    content: 'b',
    language: 'javascript',
    label: ['new', 'old']
},
{
    title: 'a',
    content: 'b',
    language: 'javascript',
    label: ['old']
}]

```

Then the result what I wanted is supposed like this:

```
{
   languageCount : [
   {
    language : 'javascript',
    count : 3
   }],
   labelCount : [
   {
    label : 'new',
    count : 1
   },
   {
    label : 'old',
    count : 2
   }]
}

```

I have no idea about how to finish my "..." part.

Anyone who has any ideas about it or any other way can work around it Please tell me, thanks a lot!