title: In Cypress how to count a selection of items and get the length?
body: <p>I'm starting to learn Cypress. I have a 4 row table (with a class of datatable). I can verify the number of rows this way:</p>
  <pre class="lang-js prettyprint-override"><code>cy.get('.datatable').find('tr').each(function(row, i){
          expect(i).to.be.lessThan(4)
  })
  </code></pre>
  <p>This is fine, but it seems awkward, since I just want to count the length and don't really need to access the stuff in the rows, and I assume it's faster to do one thing than do 4 things.</p>
  <p>If I log the selection (not sure what else to call it):</p>
  <pre class="lang-js prettyprint-override"><code>cy.log(cy.get('.datatable').find('tr'))
  </code></pre>
  <p>it comes out as <code>[object Object]</code> and I'm not quite sure how to deconstruct that, which suggests to me that I'm thinking about this all wrong.</p>
  <p>If I try:</p>
  <pre class="lang-js prettyprint-override"><code>expect(cy.get('.datatable').find('tr')).to.have.lengthOf(4)
  </code></pre>
  <p>I get <code>AssertionError: expected { Object (chainerId, firstCall) } to have a property 'length'</code></p>
  <p>If I try:</p>
  <pre class="lang-js prettyprint-override"><code>expect(Cypress.$('.datatable &gt; tr')).to.have.lengthOf(4)
  </code></pre>
  <p>I get <code>AssertionError: expected { Object (length, prevObject, ...) } to have a length of 4 but got 0</code> so at least it has a length here?</p>
  <p>If I log that method of selection I get <code>Object{4}</code>. I'm not sure where to go from here. It seems like this would be a very common thing to deal with.</p>