Get COUNT() from subquery

I have a N1QL query , in it I need add subquery with COUNT

SELECT  col_doc.*,
FROM `cms-deploy` col_doc
select count(*) from `cms-deploy` AS col_g where  _type="game"  AND  = (
    SELECT raw 
    FROM `cms-deploy` AS col_d USE KEYS META(col_doc).id where _type="providers_game" 
    WHERE  col_doc._type="providers_game"

(This is a short query and in full query a can not use group by)

But game_count does not contain correct COUNT information only first “providers_game”

Could help me ?

Currently N1QL doesn’t support correlated subquery without USE KEYS.

WITH  gameobj AS  (OBJECT
                   FOR v IN (SELECT TO_STR( AS id , COUNT(1) AS cnt
                             FROM `cms-deploy` AS g 
                             WHERE g._type = "game" AND IS NOT NULL
                             GROUP BY
SELECT c.*, gameobj.[TO_STR(] AS game_count
FROM `cms-deploy`  AS c
WHERE c._type = "providers_game";

Thank you for reply!