count( )


Returns the number of items that match the query.

The count() function returns a Promise that resolves to the number of items that match the query. The Promise is rejected if count() is called with incorrect permissions or if any of the functions used to refine the query are invalid.

Use the options parameter to run count() without checking for permissions.

Any function that does not filter query results (for example, ascending()) does not affect the result of count().

If you have already run a query with find(), you can retrieve the number of query results without calling count(). The find() function returns a Promise that resolves to a WixBookingsQueryResult object, which has a totalCount property whose value is the number of results.

Method Declaration
Copy
Method Parameters
optionsQueryOptions

Options to use when performing a query or query count.

Returns
Return Type:Promise<number>
Was this helpful?
Yes
No