title: how to count number of lines, within a cell in pandas dataframe, which are not empty lines
body: <p>For the data that I have, which looks like below (sample):</p>
  <pre><code>import pandas as pd
  
  MyDict = {'text' : ['\nbla bla text \n\n bla bla another text \n # bla text \n\n\n bla bla another text', 
                      '\nbla bla bla text2 \n\n\ bla bla bla another text it is \n\n  # bla bla bla text \n bla bla it is another text']}
  
  df = pd.DataFrame(MyDict)
  </code></pre>
  <p>I want to count the total number of lines in each cell of the column <code>text</code> which are not empty ('\n') so that I should be able to get a dataframe which should look like this:</p>
  <pre><code>text                                                                  total_lines
  'bla bla text \n\n bla bla another text \n # bla text \n\n\n...'      4
  'bla bla bla text2 \n\n\ bla bla bla another text it is \n\n...'      4
  </code></pre>
  <p>There are 4 non empty lines in cell 1 of column <code>text</code> and 4 in cell 2 and so forth...</p>
  <p>I tried to search over stackoverflow but could not find any relevant suggestions. Could someone help me on this?</p>