Count Duplicate Characters In A String Java