When using the the page_size 0, you expect to only see the result_count and no results.
Environment
VMware NSX-T Data Center VMware NSX-T Data Center 2.x VMware NSX-T Data Center 3.x VMware NSX-T Data Center 4.x
Cause
When the page_size is set to zero, the API by default was set to display a page size of 5000 and 1000 if no page_size was set, which resulted in displaying the membership results.
Resolution
This is a known issue impacting VMware NSX.
Workaround: If you wish to only see the result count and not all the membership results, you can set the page_size to 1, this implies you will have 1 membership result, but you can see the result_count.