title: How to count unread messages in Ruby on Rails 3
body: <p>I'm using the gem <a href="https://github.com/ging/mailboxer" rel="nofollow">mailboxer</a>.<br>
  Can anyone show me how to count the number of unread messages in inbox?</p>
  
  <p>I tried:</p>
  
  <pre><code>&lt;%= current_user.mailbox.inbox.unread.count %&gt;
  </code></pre>
  
  <p>but I get </p>
  
  <pre><code>'ArgumentError in Messages#received wrong number of arguments (0 for 1)'
  </code></pre>