How many characters per character?
PHP (240 characters)

Divides the html into strings (using  as a delimeter), then runs a couple of regular expressions to extract name and words spoken. Saves length of words spoken into array.
Golfed:


&lt;?@$p=preg_match_all;foreach(explode('/bl',implode(file(trim(fgets(STDIN)))))as$c)if($p('/=s.*?b&gt;(.*?):?&lt;/',$c,$m)){$p('/=\d.*?&gt;(.*?)&lt;/',$c,$o);foreach($m[1]as$n)@$q[$n]+=strlen(implode($o[1]));}arsort($q);foreach($q as$n=&gt;$c)echo"$n $c\n";


Ungolfed:


&lt;?php
$html = implode(file(trim(fgets(STDIN))));
$arr = explode('/bl',$html);
foreach($arr as $chunk){
    if(preg_match_all('/=s.*?b&gt;(.*?):?&lt;/',$chunk,$matches)){
        $name = $matches[1];
        preg_match_all('/=\d.*?&gt;(.*?)&lt;/',$chunk,$matches);
        foreach($name as $n)
            @$names[$n] += strlen(implode($matches[1]));
    }
}
arsort($names);
foreach($names as $name=&gt;$count)
    echo "$name $count\n";


Note: This considers 'All' to be a separate character.

Example:

$php shakespeare.php &lt;&lt;&lt; "http://shakespeare.mit.edu/hamlet/full.html"
HAMLET 60063
KING CLAUDIUS 21461
LORD POLONIUS 13877
HORATIO 10605
LAERTES 7519
OPHELIA 5916
QUEEN GERTRUDE 5554
First Clown 3701
ROSENCRANTZ 3635
Ghost 3619
MARCELLUS 2350
First Player 1980
OSRIC 1943
Player King 1849
GUILDENSTERN 1747
Player Queen 1220
BERNARDO 1153
Gentleman 978
PRINCE FORTINBRAS 971
VOLTIMAND 896
Second Clown 511
First Priest 499
Captain 400
Lord 338
REYNALDO 330
FRANCISCO 287
LUCIANUS 272
First Ambassador 230
First Sailor 187
Messenger 185
Prologue 94
All 94
Danes 75
Servant 49
CORNELIUS 45