title: How can I count list elements in unordered list? (RSpec/Capybara)
body: <p>In my site I have this list: </p>
  
  <pre><code>&lt;ul class="test"&gt;
    &lt;li class="social_1"&gt;&lt;/li&gt;
    &lt;li class="social_2"&gt;&lt;/li&gt;
    &lt;li class="social_3"&gt;&lt;/li&gt;
    &lt;li class="social_3"&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>My question is: how can I count <strong>li</strong> in my <strong>ul</strong> class test
  I have tried this:</p>
  
  <pre><code>my_ul = page.find("ul[class='test']")
  my_ul.each do |li|
    pp li['class']
  end
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>Is there anyway to do something like I coded above?</p>