The jQuery .length method allows you to find out how many items there are for a specified object. 

Note the when you are using .length in your code, it is not followed by a pair of parentheses. You will often use this for assigning a value to a variable or to determine the number of loop iterations to make. 

    var listLength = $("#treeType li").length;

The script above is determining how many <li> tags there are in the element with id="treeType".

The HTML for this:

<ul id="treeType">
<p id="calcNum">Calculate Number</p>
<p id="showNum">&nbsp;</p>

The result: