title: jquery how to count divs in row with different class
body: <p>I'm pretty weak in JS and I'd like some help resolving an issue.</p>
  
  <p>I want to count the number of <code>td</code> elements and add class <code>something(n)</code> to every row's <code>td</code> element. (n) - is the number of td in each row. How can I do it? Please help.</p>
  
  <p>I have code:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr class="five-1"&gt;
          &lt;td&gt;
              something           
          &lt;/td&gt;
          &lt;td&gt;
                  something2      
          &lt;/td&gt;
          &lt;td&gt;
              something3          
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="five-2"&gt;
          &lt;td&gt;
              something1          
          &lt;/td&gt;
          &lt;td&gt;
              something2          
          &lt;/td&gt;
          &lt;td&gt;
              something3      
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>