My apologies for not responding sooner. I had a server get hacked last week. Getting everything back in order definitely took away from my time here. :(
Regarding KWD, in the not so distant past, it was a fairly simple calculation of the entire page. I can remember coming up with good numbers by simply copy and pasting all visible text into Word, and then doing a word count and dividing the number by the number of times the keyword phrase appears. That used to produce fairly consistent numbers that you could use as a standard rule-of-thumb. However, there is now so many other variables, that I've found that it has become impossible to really establish any kind of solid KWD numbers.
The items that you should or should not include in any calculation will be different from engine to engine. That is why good KWD software will allow you to choose what page components you would like to analyze and then provide you with densities for each section.
I like to look at every component over several different pages. That can help you spot specific areas (link text, H1 tags, etc)that top pages have in common. The overal desities will often vary greatly, but you can usually spot a couple of areas that are similar.