Better way for obtain folder items quantity
<p>What is much the better way for understood items quantity in folder, I use this</p>

<pre><code>    function folderItemsQuantity ($folder_name) {
        $arr = glob($folder_name."/*");
        if ($arr === false) {
            return 0;
        }
        else {
            return count($arr);
        }
     }
</code></pre>

<p>there is better way or this quite enough ?</p>
