Write a test a function that counts the number of occurrences of a substring in a string. The functions has 2 parameters – the string and substring. The function returns the number of occurrences of the substring.