// This needs to be tested and an example made const widget = { 'alfa': 1, 'bravo': 2, 'charlie': 3 }; const count = Object.keys(widget).length;