Don't clear the count of deleted items on every iteration, clear it
when the cursor changes shape.