fix email queue sentOrLockedCount function