Get number of elements based on data attribute value
<p>Should be a simple thing, but I'm getting no where.</p>

<p>I want to get the number of elements with a given data-attribute value.</p>

<p>I have some html elements with various data-size='values'.  Need to get the number of items with each value.</p>

<p>If you look at the code below, I want to get the number of 'p' sizes and 'l' sizes</p>

<pre><code>$('.overview li img').each(function () {

var s = $(this).data('size');

switch (s) {
    case 'p':
        r = 0.66667
        break;
    case 'l':
        r = 1.5
        break;
}

var imgW = $(this).css({
    width: h * r + 'px'
});
</code></pre>

<p>})</p>

<p>any help greatly appreciated</p>

<p>cheers
dave</p>
