Non-Button Display In ContextMenu

I have the following contextMenu defined for my diagram:

SeatingMapGraphicsRef.contextMenu =
$(go.Adornment, "Vertical",
  // no binding, always visible button:
    $(go.TextBlock, "Hold Seats"),
    { click: function(e, obj) {
    } }),
    $(go.TextBlock, "Select Seats"),
    { click: function(e, obj) {
    } }),
    $(go.TextBlock, "Lock Seats"),
    { click: function(e, obj) {
    } }),
    $(go.TextBlock, "Cancel"),
    { click: function(e, obj) {
      var diagram = e.diagram;
    } })

I would like to define a GraphObject that isn’t a Button,
that displays within my context menu the following data:

myLocalArray.length() seats currently selected

where myLocalArray is within the scope of the contextMenu 's definition.
How do I go about doing that?

    nodeTemplate.contextMenu =
      $(go.Adornment, "Vertical",
            { stretch: go.GraphObject.Horizontal, background: "whitesmoke" },
            new go.Binding("text", "", function(obj) {
                             // obj is this contextMenu Adornment
                             return obj.diagram.selection.count + " selected";
          $("ContextMenuButton", ...),
          . . .);

This shows in the context menu how many Parts are currently selected in the Diagram, updated each time the context menu is shown. Of course you might want to improve on the visual style.

Thank you! That is exactly what I was looking for.
I just have a couple questions about some things in your code:

Why do you pass "" as the second argument of the Binding class? Is it because we are converting a string into the text property of the TextBlock object?

And finally, in the conversion function, what is ofObject() doing there? Do you add it so it applies it to the TextBlock's GraphObject? discusses many aspects of data binding. provides additional details.