title: Filtering by date in Ember
body: <p>I am looking for a way to count all entries to my ember.store today. To achieve that I wrote this controller method:</p>
  
  <pre><code>// controllers/todos-controller.js
  import Ember from 'ember';
  
  export default Ember.ArrayController.extend({
    sortProperties: ['time'],
    sortAscending: false,
    actions: {
      createTodo: function() {
        var title = this.get('newTitle');
        if (!title.trim()) { return; }
  
        var todo = this.store.createRecord('todo', {
           title: title
        });
        this.set('newTitle', '');
       todo.save();
      }
    },
    countTodos: function() {
      // count all todos added since midnight
      var d = new Date();
      d.setHours(0,0,0,0);
      return this.gte('time', d).get('length');
    }.property('@each.time'),
  });
  </code></pre>
  
  <p>and with the model</p>
  
  <pre><code>import DS from 'ember-data';
  
  export default DS.Model.extend({
    title: DS.attr('string'),
    time: DS.attr('string', {
      defaultValue: function() { return new Date(); }
    })
  });
  </code></pre>
  
  <p>However, when I call <code>countTodos</code>, I am getting the error</p>
  
  <pre><code>Uncaught TypeError: undefined is not a function
  </code></pre>
  
  <p>Based on <a href="http://emberjs.com/api/#method_computed_filter" rel="nofollow">the documentation</a> I thought I could apply <code>gte</code> to the Array. <strong>How can I count by date instead?</strong></p>