Number of lines in TextField

How to detect the no of lines in dynamic of input textfield at runtime in as3 if wordwrap is set to true please answer me fast.