title: SailsJS model count by condition
body: <p>I using count method to counting total of records by conditions. And here is my code: </p>
  
  <pre><code>    Users.count({ 
        $or: [
          { username  : { "$regex": search } },
          { email     : { "$regex": search } },
          { lastName  : { "$regex": search } },
          { firstName : { "$regex": search } }
        ]
      }).exec(function (err, total) {
        console.log(total);
        return res.json({
          "sEcho": 0, 
          "iTotalRecords": total, 
          "iTotalDisplayRecords": 7,
          "aaData": users
        });
      });
  </code></pre>
  
  <p>I always receive "total" is 0 values with any value of "search" param.
  What are my mistakes and how to fix?</p>
  
  <p>Thanks a lot!</p>