How to count uploads in strapi v4?

I’m using antd table and for lazy loading I need to count the numbers of uploads, saw on internet that there is an option with /uploads/files/count, but I have an error when try to call this path:

error: select “t0”.* from “public”.“files” as “t0” where (“t0”.“id” = $1) limit $2 - invalid input syntax for type integer: “count”

there is a native option to retrieve the number of uploads? some suggestions?

System Information
  • Strapi Version: 4.12.1
  • Operating System: macos - docker
  • Database: postgress
  • Node Version: 18+
  • NPM Version:
  • Yarn Version: