public static int countDigits(String string) { long countDigits = string.chars() .filter(Character::isDigit) .count();