I would like to count the value of a certain field only once, below is an example of how it would be:
{name: 'a', otherStuff: 'blah'},
{name: 'a', otherStuff: 'blah'},
{name: 'b', otherStuff: 'blah'},
{name: 'c', otherStuff: 'blah'},
{name: 'c', otherStuff: 'blah'},
{name: 'a', otherStuff: 'blah'}
the result I need is:
{names_count: 3}
I tried to do some sort of grouping but it didn't work