Help creating $group and $count query

Super. It is working fine.
Thank you