This awk solution might work for you:
awk '/^[0-9]:[0-9]\.[0-9]/{ if (pass_num) printf "%s, word count: %i\n", pass_num, word_count pass_num=$1 word_count=-1 } { word_count+=NF } END { printf "%s, word count: %i\n", pass_num, word_count } ' file
Test input:
# cat file 0:1.1 I am le passage one. There are many words in me. 0:1.2 I am le passage two. One two three four five six Seven 0:1.3 I am "Hello world"
Test output:
0:1.1, word count: 11 0:1.2, word count: 12 0:1.3, word count: 4
How it works:
Each word is separated by empty space, so each word can be represented by each field in awk, i.e. word count in a line is equal to NF. The word count is summed up every line until the next passage.
When it encounters a new passage (indicated by the presence of a passage number), it
- prints out the previous passage's number and word count.
- set passage number to this new passage number
- reset passage word count (
-1 because we don't want the passage number be counted)
The END{..} block is needed because the final passage doesn't have a trigger that causes it to print out the passage number and word count.
The if (pass_num) is to suppress printf when awk encounters the first passage.