title: Counting the number of dots in a string
body: <p>How do I count the number of dots in a string in BASH? For example</p>
  
  <pre><code>VAR="s454-da4_sd.fs_84-df.f-sds.a_as_d.a-565sd.dasd"
  
  # Variable VAR contains 5 dots
  </code></pre>