title: Access HTML attribute value in SASS
body: <p>Is it possible to access an HTML attribute value in SASS? 
  I have a line of code that says</p>
  
  <pre><code>&lt;ul id="my_id" data-count="3"&gt;
  </code></pre>
  
  <p>where the <code>3</code> is the result of some jQuery stuff. I need the <code>3</code> to calculate some CSS. How can I save it as a SASS variable?</p>
  
  <p>Alternatively, is there a way of counting the number of child elements of a certain parent element? Say I have this code:</p>
  
  <pre><code>&lt;ul id="my_id" data-count="3"&gt;
      &lt;li&gt;First list item&lt;/li&gt;
      &lt;li&gt;Second list item&lt;/li&gt;
      &lt;li&gt;Third list item&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>(As you might have guessed, the value of <code>data-count</code> matches the number of list items.) Can SASS count the list items and save that number as a variable?</p>
  
  <p>Any ideas would be greatly appreciated.</p>