PRD-4691: Check count before indexing.