system/classes/Collection.php
public function count($includeParents = false, $recount = false)
    {
        if ($recount) {
            return $this->getIterator()->count();
        }
        return $this->size;
    }
public function count($includeParents = false, $recount = false)
    {
        if ($recount) {
            return $this->getIterator()->count();
        }
        return $this->size;
    }
Returns the number of resources stored in this container/collection.

@param includeParents Include parent resources in the total count?
@param recount If true, then recounts the items rather than returning the stored count.
@return The number of resources stored in this Container.