title: Number of inactive jobs in Kue
body: <p>Is there any known API for getting number of jobs in Kue? For example, I want to get number of inactive jobs.</p>
  
  <p>Right now I have this portion of code that gets the JOBS. </p>
  
  <pre><code>var kue = require('kue'),
  jobs = kue.createQueue();
  
  kue.Job.rangeByType ('job', 'failed', 0, 10, 'asc', function (err, selectedJobs) {
      selectedJobs.forEach(function (job) {
          job.state('inactive').save();
      });
  });
  </code></pre>
  
  <p>I can use selectedJobs.length. However, this is bad form performance perspective.</p>
  
  <p>Thanks in advance</p>