#6359: Use number of items to iterate through result list.
Merge branch 'SCHOLAR-3.x' into 6359-handle_fatal_better
Merge pull request #6717 from openscholar/6359-handle_fatal_better

Use number of items to iterate through result list.