Search.../

totalCount

Returns the total number of items that match the query.

Description

The totalCount returns the total number of items that match the query, not just the number of items in the current page.

Type:

numberRead Only

Was this helpful?

Get the number of items in a query result

Copy Code
1let resultCount = results.totalCount; // 150
Perform a query and get the number of items in the result

Copy Code
1import wixData from 'wix-data';
2
3// ...
4
5wixData.query("myCollection")
6 .find()
7 .then((results) => {
8 let resultCount = results.totalCount; // 150
9 }) ;