Find out how you're DOM nodes are distributed

This little bookmarklet:

javascript:var n=document.getElementsByTagName('*');var o=[];for(var i=0;i<n.length;i++){var x=-1;for(var j=0;j<o.length;j++){if(o[j].m==n[i].nodeName) {x=j;break;}}if(x>0) {o[x].c++;}else{o.push({m:n[i].nodeName,c:1});}}o=o.sort(function(a,b){return(a.c<b.c)?1:(a.c>b.c?-1:0);});for(var i=0;i<o.length;i++){o[i]=o[i].m+": "+o[i].c;}alert(o.join("
"))

will grab all the nodes on the page and tell you the number of each node in descending order, like so (from the Google home page using Google Labs experimental search):

A: 28
SPAN: 21
BR: 10
DIV: 6
INPUT: 4
FONT: 4
TD: 3
SCRIPT: 2
NOBR: 2
B: 2
HTML: 1
HEAD: 1
META: 1
TITLE: 1
STYLE: 1
BODY: 1
U: 1
SMALL: 1
CENTER: 1
IMG: 1
FORM: 1
TABLE: 1
TBODY: 1
TR: 1
P: 1

13:23 Mon 2008-05-12 (Index)

Say something!