def PatternCount(Text, Pattern):
    """Count the input patern in the text."""
    Text = str(Text)
    Pattern = str(Pattern)
    count = 0
    for i in range(len(Text) - len(Pattern) + 1):
        if Text.find(Pattern, i, i + len(Pattern)) != -1:
            count = count + 1
    return count