(value)
return len(newline_re.findall(value))
Count the number of newline characters in the string.  This is
    useful for extensions that filter a stream.
Count the number of newline characters in the string.  This is
    useful for extensions that filter a stream.
Count the number of newline characters in the string . This is useful for extensions that filter a stream .
def count_newlines(value):
    """Count the number of newline characters in the string.  This is
    useful for extensions that filter a stream.
    """
    return len(newline_re.findall(value))
def count_newlines ( value ) : return len ( newline_re . findall ( value ) )