GTNPORTAL-2806 Introduce option 'countPaginatedMemberships' to decide if we count paginated memberships or perform full query and filter memberships later