public function dump($input, array $config = array())
    {
        $config = array_replace_recursive(array(
            'encoding' => 'UTF-8',
            'options'  => LIBXML_PARSEHUGE,
        ), $config);

        $this->prepare($input, $config);

        $paths = array();

        while ($this->nextElement()) {
            if (! $this->reader->isEmptyElement && $this->reader->nodeType === XMLReader::ELEMENT) {
                $paths[] = $this->current;
            }
        }

        return array_count_values($paths);
    }