Collection - Group by reference

Hi,

I’ll explain my question with an example:

I have a blog post collection referencing the author collection. Is it possible to perform a count on the blog posts written by a particular author, so I could display a list of author names followed by the number of blog posts they have written.

e.g.

  • John Doe (3)
  • Jane Doe (5)

Clicking the name would open a new page listing the blog post titles of that author.

Is this possible in webflow somehow?

Thanks!