How to Count in REST API in v4?

I have the same error but in an update.
I have tried with in engine and entity service and the error persists