title: R count character column
body: <p>I want to add a column containing the amount of letters a-z in a different column from the same row.</p>
  
  <pre><code>dataset$count &lt;-length((gregexpr('[a-z]', as.character(dataset$text))[[1]]))
  </code></pre>
  
  <p>does not work. </p>
  
  <p>The result I would like to acheive:</p>
  
  <pre><code>text  |  count
  a     |  1
  ao    |  2
  ao2   |  2
  as2e  |  3
  as2eA |  3
  </code></pre>