code: function() {
              var messages = app.database.messages.find({ threadId: this.uid }, ok(this.set.bind(this, "messages")));
  
              // update unreadMessageCount whenever the messages collection
              // changes
              messages.watch(function() {
                  this.set("unreadMessageCount", messages.filter(function(message) {
                      return !message.read;
                  }).length);
              }.bind(this));
          }
docs: start computations on messages only as they're demanded by the application