How to format N1QL Query with count and Subquery

I have a interesting challenge which i hope i can solve with N1QL vs having to do multiple query’s and than use API to build correct data. I have 2 type of docs, one lets called parent is the tract info and the second is the child which is farm. What i like to do is get a summary based on a status of the child for the parent.
Here is the query that gets me the info but not in desired format,

select c.name,
(SELECT Record.ownerOccupied,
       COUNT(*) AS count
FROM Contacts 
WHERE _type = 'farm'
    AND Record.tract IN c.tract_id
GROUP BY Record.ownerOccupied
UNION ALL
SELECT COUNT(*) AS Total
FROM Contacts e
WHERE _type = 'farm'
AND e.Record.tract IN c.tract_id) as test
from  Contacts c where _type = 'tract_info'

The above produces the following output

[
  {
    "name": "Brisa del Mar",
    "test": [
      {
        "Total": 83
      },
      {
        "count": 70,
        "ownerOccupied": true
      },
      {
        "count": 13,
        "ownerOccupied": false
      }
    ]
  }
]

but i am looking to create output like this, is that possible ?

[
  {
    "name": "Brisa del Mar",
    "Total": 83,
   "ownerOccupied": 70,
   "NoneOwnerOccupied": 13
  }
]

i was able to create a desired Output with below query but not certain there is no belter way  

SELECT c.name,
       (
           SELECT RAW
                  COUNT(*) AS ownerOccupied
           FROM Contacts
           WHERE _type = 'farm'
               AND Record.tract IN c.tract_id and Record.ownerOccupied = true
           GROUP BY Record.ownerOccupied)[0] as OwnerOccupied,
            (
           SELECT RAW
                  COUNT(*) AS NoneOwnerOccupied
           FROM Contacts
           WHERE _type = 'farm'
               AND Record.tract IN c.tract_id and Record.ownerOccupied = false
           GROUP BY Record.ownerOccupied)[0] as NoneOwnerOccupied,
            (
           SELECT RAW
                  COUNT(*) AS TotalCount
           FROM Contacts
           WHERE _type = 'farm'
               AND Record.tract IN c.tract_id)[0] as TotalCount
FROM Contacts c
WHERE _type = 'tract_info'
SELECT c.name,
       ARRAY_SUM(ContactList[*].cnt) AS Total,
       OBJECT v.name:v.cnt FOR v IN ContactList END.*
FROM Contacts AS c
LET ContactList = (SELECT CASE Record.ownerOccupied THEN "OwnerOccupied" ELSE "NoneOwnerOccupied" END name,
                          COUNT(1) AS cnt
                   FROM Contacts
                   WHERE _type = "farm" AND Record.tract IN c.tract_id
                   GROUP BY Record.ownerOccupied)
WHERE _type = "tract_info";

OR

CREATE INDEX ix1 ON Contacts(Record.ownerOccupied, Record.tract) WHERE _type = "farm";
CREATE INDEX ix2 ON Contacts(name, tract_id) WHERE _type = "tract_info";

SELECT c.name,
       OwnerOccupied,
       NonOwnerOccupied,
       (OwnerOccupied+NonOwnerOccupied) AS Total,
FROM Contacts AS c
LET OwnerOccupied = (SELECT RAW COUNT(1)
                     FROM Contacts
                     WHERE _type = "farm" AND Record.tract IN c.tract_id AND Record.ownerOccupied = true)[0],
    NonOwnerOccupied = (SELECT RAW COUNT(1)
                        FROM Contacts
                        WHERE _type = "farm" AND Record.tract IN c.tract_id AND Record.ownerOccupied = false)[0]
WHERE _type = "tract_info" AND c.name IS NOT NUL;

it complains about reserved word

“msg”: “syntax error - line 3, column 28, near ’ OBJECT v.name:v.cnt’, at: FROM (reserved word)”,

try again FROM vs FOR