title: Track variable change in Angular 5
body: <p>I have a simple class which defines a <code>checked</code> variable as a boolean.  My component then has an array of those objects, and the HTML shows each one.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;tr *ngFor="let element of filteredElements"&gt;
      &lt;td&gt;
        &lt;input type="checkbox" [checked]="element.checked" (change)="onCheckChanged(element)"&gt;
  </code></pre>
  
  <p>Now I want to add a display value that tells me how many items are checked at any given point.  I'm not sure how to have the component "watch" all of those elements.  I could change the value of <code>checked</code> from many different places.</p>
  
  <p>I'm feeling like I need some type of Observable here but am not sure how to implement this.</p>