Thank you @jcarlson! This works great!
I even see now that you suggested this as a solution when I asked a similar question some weeks ago, but I couldn't wrap my head around it at the time.
For the point count to be reflected in the web map that is shown in the dashboard, would it work to use this expression on the popup settings in the web map?