function CountLog() {
	this.items = new Array();
	this.counts = new Array();
}

CountLog.prototype.log = function (sEntry) {
	if(this.items[this.items.length - 1] == sEntry) {
		this.counts[this.counts.length - 1]++;
	} else {
		this.items.push(sEntry);
		this.counts.push(1);
	}
}

CountLog.prototype.getString = function () {
	var sLog = '';
	for(var iEntry = 0; iEntry < this.items.length; iEntry++) {
		sLog += '\n' + this.items[iEntry] + ' (' + this.counts[iEntry] + ')';
	}
	return sLog;
}