You might want to look into the nwSkipTotal parameter which gets discussed here: nwSkipTotal = false is limiting out at 100,000 when true result is higher
However even it has limitations (if higher) on how many records it will say exists. For an unbounded count, you should use the /v2/aggregate endpoint. There is no official documentation that I’m aware of right now for that endpoint, but here’s an example of how you can call it:
curl --request POST \
--url {baseurl}/v2/aggregate \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data ' {
"nwTable": "Directory",
"nwFilter": {
"ContactRoleGrouping": {
"$multi": [
"SUPP"
]
}
},
"nwAggregate": [
{
"nwFields": "@count:nwId",
"nwGroupBy": ""
}
]
}'