If the div's size is dependent on the content (which I assume to be the case from your description) then you can retrieve the div's height using:
var divHeight = document.getElementById('content').offsetHeight;
And divide by the font line height:
document.getElementById('content').style.lineHeight;
Or to get the line height if it hasn't been explicitly set:
var element = document.getElementById('content');
document.defaultView.getComputedStyle(element, null).getPropertyValue("lineHeight");
You will also need to take into account padding and any inter-line spacing.
EDIT
Full self contained test, explicitly setting line-height:
<html>
<script>
function countLines() {
var divHeight = document.getElementById('content').offsetHeight;
var lineHeight = parseInt(document.getElementById('content').style.lineHeight);
var lines = divHeight / lineHeight;
alert("Lines: " + lines);
}
</script>
<body onload="countLines();">
<div id="content" style="width: 80px; line-height: 20px;">
hello how are you? hello how are you? hello how are you? hello how are you?
</div>
</body>
</html>