Whats the best way to count the number of records in a database?

Periodically, I sync a large database from Fibery to another platform. I do this in batches of 500 records.
Right now, I send the same query that use to retrieve the record details in a batch of 500 with the q\no-limit parameter. Then store the length of the Body array that is returned and use that to determine the number of pages I need to retrieve.

{
    "command": "fibery.entity/query",
    "args": {
      "query": {
        "q/from": "Space/Database",
        "q/select": {
          "fibery/id": [
            "fibery/id"
          ]
        },
        "q/where": [
          "and",
          [
            "!=",
            [
              "Space/Database",
              "fibery/id"
            ],
            "$where1"
          ],
          [
            "q/not-contains",
            [
              "Space/Field"
            ],
            "$where2"
          ]
        ],
        "q/offset": 0,
        "q/limit": "q/no-limit"
      },
      "params": {
        "$where1": null,
        "$where2": "text"
      }
    }
  }

Is this the most efficient api call to get a count of how many records there are in a database?