I modified the on-line word count program slightly to allow a minimum word count value to be displayed. If the optional count value isn't passed in the text box after the URL, then all words are shown. It looks like you don't need to use the double quotes around the URL either.
' Online word count script
IMPORT curl.bas
cmd_line = COMMAND()
IF TRIM(cmd_line) = "" THEN
PRINT """
ScriptBasic Word Count Program
Usage: Usage: URL <minimum_word_count>
"""
END
END IF
SPLIT cmd_line BY " " TO fname, min_cnt
IF min_cnt < 1 THEN min_cnt = 1
ch = curl::init()
curl::option(ch,"URL",fname)
curl::option(ch,"FILE","local_file.txt")
curl::perform(ch)
curl::finish(ch)
fsize = FILELEN("local_file.txt")
OPEN "local_file.txt" FOR INPUT AS #1
text = INPUT(fsize, #1)
CLOSE #1
strip = "()[]{}|<>/@0123456789*.,;:!#?%$&+=_~\"\\" & CHR(9) & CHR(10) & CHR(13)
FOR i = 1 TO LEN(strip)
text = REPLACE(text, MID(strip, i, 1), " ")
NEXT i
SPLITA text BY " " TO word_list
OPEN "wc.raw" FOR OUTPUT AS #1
FOR x = 0 TO UBOUND(word_list)
text_out = TRIM(word_list[x])
IF LEN(text_out) THEN PRINT #1,LCASE(text_out),"\n"
NEXT x
CLOSE #1
ok = EXECUTE("sort wc.raw -o wc.srt", -1, PID)
OPEN "wc.srt" FOR INPUT AS #2
last_word = ""
word_count = 0
word_total = 0
Next_Word:
IF EOF(2) THEN GOTO Done
LINE INPUT #2, this_word
this_word = CHOMP(this_word)
word_total += 1
IF last_word = "" THEN last_word = this_word
IF this_word = last_word THEN
word_count += 1
GOTO Next_Word
END IF
IF word_count >= min_cnt THEN PRINT last_word & " (" & word_count & ")\n"
last_word = this_word
word_count = 1
GOTO Next_Word
Done:
PRINTNL
CLOSE #2
DELETE "wc.raw"
DELETE "wc.srt"
DELETE "local_file.txt"
END