Changed the count method to return # of lines that match a given regular expression.