Sub-level count function not working when filter applied
- Dominant language
- TypeScript
- Stars
- 37.9k
- Forks
- 4.9k
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 36
Description
### Describe the Bug
I'm trying to combine a filter with the count function on a sub-level collection, filter works as expected but the count function returns all the items before the filter is applied.
### To Reproduce
Here's the example, the count for the project_updates collection should show 1 (i'm requesting the updates related to a single project, in this case and for example purposes only 1 update has been made) as it is in the GET response, but instead is showing 11, which are all the items related to the parent collection.

### Errors Shown
No.
### What version of Directus are you using?
9.14.5
### What version of Node.js are you using?
14.16.0
### What database are you using?
MySQL / MariaDB / Percona 10.3.34
### What browser are you using?
chrome
### How are you deploying Directus?
Self Hosted, Ubuntu + plesk
Contributor guide
Assessment
This issue has not been assessed yet.