var myObject = {'key':'something', 'other-key':'something else','another-key': 'another thing'} var count = Object.keys(myObject).length;