Если очень хочется:

Код:
__get__attributesLength = function() {
var i = 0;
for (var j in this.attributes) {
i++;
}
return i;
}
XMLNode.prototype.addProperty('attributesLength', __get__attributesLength, null);
xml = new XML('<node param="1" param2="2"/>');
trace(xml.firstChild.attributesLength);