count matches of current search pattern