title: use d3js to update text in div tag
body: <p>In the html, I labeled a div tag</p>
  
  <pre><code>&lt;div id='count'&gt;Head count:  &lt;/div&gt;
  </code></pre>
  
  <p>My goal is to update the count according to user driven events. In the js file, I have </p>
  
  <pre><code>d3.select('#count')
    .append('text')
    .text(users.length);
  </code></pre>
  
  <p>Here <code>users.length</code> changes upon user driven events. This is not what I want though. What I want is not 'append' but 'update' the text. How can I achieve that?</p>