Task rest api is not showing all the task present in process
Could you please upload your process and how does your request look like?
This is the API you are looking for: https://docs.camunda.org/manual/7.8/reference/rest/history/activity-instance/get-activity-instance-query-count/. You can filter by process definition id, activity id and select only those instances that are not finished yet.
The API you gave in your first post only returns tasks in the sense of work items for users.