public function countOfType(string $name): int
    {
        $oid = AttributeType::attrNameToOID($name);
        return array_sum(
            array_map(
                function (RDN $rdn) use ($oid) {
                    return count($rdn->allOf($oid));
                }, $this->_rdns));
    }
public function countOfType(string $name): int
    {
        $oid = AttributeType::attrNameToOID($name);
        return array_sum(
            array_map(
                function (RDN $rdn) use ($oid) {
                    return count($rdn->allOf($oid));
                }, $this->_rdns));
    }
public function countOfType ( string $ name ) : int { $ oid = AttributeType :: attrNameToOID ( $ name ) ; return array_sum ( array_map ( function ( RDN $ rdn ) use ( $ oid ) { return count ( $ rdn -> allOf ( $ oid ) ) ; } , $ this -> _rdns ) ) ; }
Get the number of attributes of given type.

@param string $name Attribute OID or name
@return int
Get the number of attributes of given type .