I am not sure what do you mean by "number of lines" - is it the number of carriage returns (created by pressing the Enter key) or the number of places where the input string splits to a new line? I am not aware of a way to count the second number, however, I can research this if needed.
var newLines = 0;
for (var j = 0; j < textboxvalue.length; j++)
if (textboxvalue.charCodeAt(j) == 10)
All the best,
the Telerik team
Check out Telerik Trainer
, the state of the art learning tool for Telerik products.