Actually, if you remove the method definition from the top of the `.yaml` file, it should just work.  An event handler is attached to an event using the same syntax as setting the body of a method to its method name.  So, in your case:

    this.blockCountChanged = function() { ... }