Add count option and set patternfile as pattern option's substitute