Count Repeated Characters In A String In Java