title: Find semicolon in dataframe R
body: <p>I have this dataframe:</p>
  <pre><code>id &lt;- c(1,2,3,4,5)
  org &lt;- c(NA, &quot;Org-A&quot;, &quot;Org-A;Org-B&quot;, &quot;Org-C&quot;, &quot;Org-A;Org-B;Org-C&quot;)
  df &lt;- data.frame(id, org)
  </code></pre>
  <p>I want to find the number of organizations for each ID. But the 'Organization' in this table is separated by a semicolon, the result I want to achieve:</p>
  <pre><code>  id               org   num
  1  1              &lt;NA&gt;   NA
  2  2             Org-A   1
  3  3       Org-A;Org-B   2
  4  4             Org-C   1
  5  5 Org-A;Org-B;Org-C   3
  </code></pre>
  <p>I think to solve this problem require something like this:</p>
  <pre><code>df['num'] = ifelse(is.na(df['org']), NA, ifelse( &quot;something about regex&quot;, &quot;count the number of semicolons&quot;, 1))
  </code></pre>