count static method
count the objects in the collection
,
throws StrapiResponseException if response is failed
Implementation
static Future<int> count(String collection) async {
final path = collection + "/count";
final response = await Strapi.i.request(
path,
);
if (response.failed) {
throw StrapiResponseException(
"failed to count at collection $collection", response);
}
return response.count;
}