code: function(ctx, title) {
  		var node = ctx.node,
  			extOpts = ctx.options.childcounter,
  			count = (node.data.childCounter == null) ? node.countChildren(extOpts.deep) : +node.data.childCounter;
  // Let the base implementation render the title
  		this._super(ctx, title);
  // Append a counter badge
  		if( (count || ! extOpts.hideZeros) && (!node.isExpanded() || !extOpts.hideExpanded) ){
  			$("span.fancytree-icon", node.span).append($("<span class='fancytree-childcounter'/>").text(count));
  		}
  	}
docs: Overload the `renderTitle` hook, to append a counter badge