SSP-2718 Avoid reading entire result set for directory result cnt