int count = StringUtils.countMatches("a.b.c.d", ".");
veyaint count = line.length() - line.replace(".", "").length();
veyaint replaceAll = testString.replaceAll("[^.]", "").length();
veyaint replaceAllCase2 = testString.length() - testString.replaceAll("\\.", "").length();
veyaint split = testString.split("\\.",-1).length-1;