public static int countPeriods(String haystack){
  return StringUtils.countOccurrencesOf(haystack,".");
}

public static int countPeriods ( String haystack ) { return StringUtils . countOccurrencesOf ( haystack , "." ) ; }
count the number of periods in a value .
