var str = '<table id="stuff">\
<tr>\
<td>\
Ель\
</td>\
</tr>\
<tr>\
<td>\
Дуб\
</td>\
</tr>\
<tr>\
<td>\
Клен\
</td>\
</tr>\
<tr>\
<td>\
Дуб\
</td>\
</tr>\
<tr>\
<td>\
Ель\
</td>\
</tr>\
</table>';
var arr =str.split(/<[^>]*>/gim).join(',').split(/(\s*,)+/gim).join(',').split(/,+/)
arr.splice(0,1);arr.pop();
var obj={};
for(var i=0;i<arr.length;i++){
if(!obj[arr[i]])obj[arr[i]]=0;
obj[arr[i]]++;
}
arr = [],j=0;
for(var i in obj){
arr[j] = i+':'+obj[i];
j++;
}
alert(arr.join('\n'))