I don't know that there is an easy way to do this within the NCBI website. However, you can get some of the way with a well-defined search and some scripting.
I would start with a taxonomy search for Annelida. Clicking through (just keep clicking on "Annelida") gets to the summary page, showing (at present) 31 606 nucleotide records.
We can then qualify that search further:
txid6340[Organism:exp] AND COI[Gene]
to retrieve 11 208 records.
At this point, you should click on "Send to -> File" and choose an output format. "Genbank" or "XML" are good choices, since they are structured formats and will contain a field for the species. However, this may result in a large download.
Genbank format includes the field ORGANISM, e.g.
ORGANISM Drilonereis longa
So we can count up the terms that come after the word ORGANISM using grep, cut and awk:
grep ORGANISM sequence.gb |
cut -d " " -f 4- |
awk 'BEGIN{OFS="\t"} {n[$0]++} END {for (i in n) {print i, n[i]}}'
> wormcount.txt
Result (first 5 lines only):
Nephtys sp. CMC05 1
Nephtys sp. CMC06 1
Amynthas lini 9
Mesenchytraeus solifugus 64
Satchellius mammalis 11
Unique ORGANISM with COI:
wc -l wormcount.txt
# 1995 wormcount.txt