title: Frequency counter for Strings in Java
body: <p>I have a <code>string</code> that a user will type in representing time.  i.e "10:05"</p>
  
  <p>I've been searching for a while, and cannot find a way to search this <code>string</code> to find a specific number.  The reason I need this number, is because I need to take each number and use an <code>algorithm</code> to discover how much power it takes to display this number on a digital clock.  To do so, I need the frequency of each number.  For example, if the time was 10:05, the number 0 would occur 2 times, and I can take that 2 and multiply it by the necessary numbers to discover the power needed.</p>