count_pattern