localStorage is an object, so just localStorage.length gives you the number of records.
However, I think I might misunderstand you. You mean that you have one key, and this key value is the JSON.stringify 'd object? If so, you can do JSON.parse(localStorage.keyname).length to non-sterilize the value and count the number of people there.
source share