console.count()

console.count() logs the number of times that a particular content has been logged out by count().

[...'Hello world'].forEach(letter => console.count(letter));

//output
//h: 1
//e: 1
//l: 1
//l: 2
//o: 1
// : 1
//w: 1
//o: 2
//r: 1
//l: 3
//d: 1

See CodePen console.count() and MDN console.count().

Comments