#!/usr/bin/ruby

#
## https://rosettacode.org/wiki/Count_occurrences_of_a_substring
#

say "the three truths".count("th");
say "ababababab".count("abab");