Based on the code you provided, it seems like you are iterating through the element object and keeping track of the number of properties within that object.
As mentioned by other contributors, PrototypeJS introduces extra methods and properties to the standard Javascript definition of the HTMLElement.
I suggest checking out the Element namespace which outlines all the additional methods and properties incorporated by PrototypeJS.
Additional details:
How exactly does PrototypeJS introduce new methods to an element?
To begin with, it is important to grasp the concept of a javascript prototype - essentially, it serves as a blueprint for constructing an object. When a new object of that type is instantiated, it inherits all the methods specified in the blueprint alongside those further up the prototype chain.
A simple illustration of a prototype chain
DIVElement -> HTMLElement -> Object
Therefore, a fresh div element inherits the methods from the DIVElement prototype, HTMLElement prototype, and Object prototype.
This explains why extending the Object prototype is discouraged, as it affects everything derived from that prototype.
In the case of PrototypeJS, it extends the HTMLElement.prototype
object with novel methods not inherently present in most browsers. Consequently, whenever a new HTML element is generated using javascript, it automatically adopts the PrototypeJS methods.
For more precise reference in the source code
Object.extend(GLOBAL.Element, {
extend: extend,
addMethods: addMethods
});
This snippet often appears towards the conclusion of various feature detections to determine browser-supported elements, among other functions.