Count number of occurrences in a String.
int countString(String sub, String original) { return elemIndicesString(sub, original).length; }