title: Count tr in tbody, which have a certain style trait
body: <p>I've trying to count the number of <code>td</code>'s in a <code>tbody</code>, which have a <code>white background-color</code>. I need to update the text of a <code>span</code> after my count. The class of my <code>span</code> is <code>.attendenceCount</code></p>
  
  <pre><code>$(".attendenceCount").closest('tbody')...
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Søløve 16:50-17:30 (3017) &lt;span style="color:black;" class="attendenceCounter"&gt;tmp&lt;/span&gt;
              &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr style='background-color:white;'&gt;
              &lt;td&gt;Albert Hvistendahl Fabel&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr style='background-color:green;'&gt;
              &lt;td&gt;Albert Hvistendahl Fabel&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr style='background-color:white;'&gt;
              &lt;td&gt;Albert Hvistendahl Fabel&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr style='background-color:green;'&gt;
              &lt;td&gt;Alma Valbjørn Bratved&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr style='background-color:white;'&gt;
              &lt;td&gt;Albert Hvistendahl Fabel&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>How would this be possible?</p>