Measurable Success «10 Checkpoints for Future-Proof Enterprise CMS» White Paper
Measurable Success - White Paper

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());