Another approach to count number of list elements:
var num = $("#menu").find("li").length;_x000D_
if (num > 1) {_x000D_
console.log(num);_x000D_
}
_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>_x000D_
<ul id="menu">_x000D_
<li>Element 1</li>_x000D_
<li>Element 2</li>_x000D_
<li>Element 3</li>_x000D_
</ul>
_x000D_