I put the script in a external file
// Excerpt word count
function excerpt_count_js(){
wp_enqueue_script( 'excerpt-word-count', plugins_url( 'excerpt_word_count.js', __FILE__ ), array( 'jquery' ), false, true );
}
And modified the script a bit
jQuery(document).ready(
function($){
$("#postexcerpt .handlediv")
.after("<div style=\"position:absolute;top:2px;right:5px;color:#666;\"><small>Excerpt length: </small><input type=\"text\" value=\"0\" maxlength=\"3\" size=\"3\" id=\"excerpt_counter\" readonly=\"\" style=\"background:#fff;\"> <small>word(s).</small></div>");
$("#excerpt_counter").val($("#excerpt").val().split(/\S+\b[\s,\.\'-:;]*/).length - 1);
$("#excerpt").keyup(
function() {
$("#excerpt_counter").val( $("#excerpt").val().split(/\S+\b[\s,\.\'-:;]*/).length - 1);
}
);
}
);
Finally change the hook for loading the script
add_action( 'load-post.php', 'excerpt_count_js');
add_action( 'load-post-new.php', 'excerpt_count_js');
No problems at all.
Just to clearify: with ‘permalinks’, did you mean the permlink of the post (the line between title input and content input) ?