code: def vocab_counter(args):
    
    if isinstance(args.input, TextFiles):
      v = CountedVocabulary.from_textfiles(args.input, workers=args.workers)
    else:
      v = CountedVocabulary.from_textfile(args.input, workers=args.workers)
    if args.min_count > 1: 
      v = v.min_count(args.min_count)
    if args.most_freq > 0:
      v = v.most_frequent(args.most_freq)
    print(v)
docs: Calculate the vocabulary.