I am converting a query from MS SQL to Snowflake SQL and I would like to know how to turn a record count using a subquery (or Snowflake equivalent). In the code below, "NUM