I would suggest not having a separate endpoint that simply counts the number of results. In v4, you will receive additional metadata for paginated results that will include a total attribute.
If this isn’t suitable for whatever reason, you should create an endpoint that returns the data and the total count in a single response. Otherwise, you’re doubling up on queries to the database and creating double the workload on all resources between the user and the data source.