How to count the number of characters in a DIV with javascript
$('#mydiv').text().length
should do the trick.
Try this. I am trimming to avoid any white spaces in the content start or end.
$.trim($("#mydiv").text()).length
If you want to keep spaces also in the count then don't trim it just use this.
$("#mydiv").text().length
Sample
http://jsfiddle.net/TrMRB/
$("#mydiv p").text().length;