Counting the number of objects that appear in a different mongo collection

I have a table of objects, let’s call them videos, from one mongo collection, and each of those objects is referenced as part of an array of activities. I would like to add a column to my table that lists how many times each video shows up in the activities collection.

How do I do this? Is there a way to put a query in a calculated column and have it execute on each row?