Counting elements is sometimes very important task so here is the simple tutorial of <strong>counting number of elements in jquery.</strong> You can count any elements but the elements must be within the parent container.
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<a href="#" id="countitems">Count Number of List Items in following List</a>
<ul id="list">
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ul>