Learn how Scrivito CMS can help you deliver amazing digital experiences
See Scrivito CMS in action

count()

The total number of search results.

Scrivito.Obj.where("_objClass", "equals", "BlogPost").count();

Returns

Number – the total number of search results.

Remarks

The returned value is always the total number of results, irrespectively of whether an offset is given or not.

Example

Count the Page objects in the CMS:

console.log(Scrivito.getClass("Page").all().count());