Hi @gorlaz,
I actually changed the code and used the entityServices api instead in the github.
Can you try the following controller instead?
src/api/product/controllers/product.js
'use strict';
/**
* product controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::product.product', {
count(ctx) {
var { query } = ctx.request
return strapi.entityService.count('api::product.product', query);
}
});
Also, what database are you using?