Add support for 'count()' special value for 'total' attribute (collections)

Allow to define:

    Foo\Bar:
        rootName: 'bars'
        attributes:
            - total: 'count()'

        links:
            - ...

That way, the 'total' attribute defined on the "bars" tag will be set
with the number of `Bar` elements:

    <bars total="1">
        <bar>...</bar>
    </bars>

This is useful when you have a collection or array of objects.