code: def mail_sent_count(self, count):
      
      expected = int(count)
      actual = len(mail.outbox)
      assert expected == actual, \
          "Expected to send {0} email(s), got {1}.".format(expected, actual)
docs: Test that `count` mails have been sent.
  
      Syntax:
  
          I have sent `count` emails
  
      Example:
  
      .. code-block:: gherkin
  
          Then I have sent 2 emails