fixed a bug that caused the number of emails to appear incorrectly in the output