js countkeys
let count = Object.keys(myobj).length
Puzzled Pollan
let count = Object.keys(myobj).length
//To count objects own enumarable properties
const objectName={example:10}
console.log(Object.keys(objectName).length)
let count = 0;
for (let k in myobj) if (myobj.hasOwnProperty(k)) count++;