def METHOD_NAME(self, msg, ignore_case=False, count=1):
    if ignore_case:
        msg = msg.lower()
    if isinstance(msg, REGEXP_TYPE):
        def match(x): return msg.search(x) is not None
    else:
        def match(x): return x.find(msg) >= 0
    pred = match
    if ignore_case:
        def pred(x): return match(x.lower())
    return len(self.lines(filter=pred)) >= count