REST api supports adding &count=true. Using JS SDK one needs to run a separate query.count() to get this number Would be nice to have some optional flag like query.withCount(true/false) to avoid making separate async calls