Implement a function in Python to print the number of times 'Hello World' is printed, given a string and a substring.
string = 'Hello World, Hello World'
substring = 'Hello World'
def countStringOccurrences(string, substring):
    cnt = 0
    index = -1
    while string.find(substring, index + 1) != -1:
        index = string.find(substring, index + 1)
        cnt += 1 
    return cnt

occurrences = countStringOccurrences('Hello World, Hello World', 'Hello World')
print(occurrences)