string repeated characters count in java 8