Counting highlighted words in Writer

I have a text in writer with a number of words highlighted (alwauýs with the same background colour).
In some cases they are single hightlighted words, but there are also whole sentences or paragraphs that are highlighted.
How can I count how many words are highlighted.

There is an extension that is an alternative for Find, where I can look up instances of background colour, but it doesn’t count words, but rather blocks where a highlight was applied.

So the question remains: how to count all the highlighted words in a Writer document.

Thanks for your answers.
I don’t know why, but in both cases, Altsearch and Find & Replace, the operation gives 0 as a result: not found. The highlights were added from the normal Format workbar.

If you can select required text(s) using any method (like using AltSearch and its Find All), then you may then read the word count in the selected text on the status bar:

image description

Method using the Find & Replace:

  • choose menu Edit - Find & Replace… (same as Ctrl+H)
  • leave the Find field empty
  • press Format… and select the Highlighting tab
  • press Color, choose the color from the Palette, and press OK
  • verify that Current selection only and Comments are unchequed
  • press Find All
  • see the word count in the status bar

Note that Background color (or Area Color, in the dialog) is an attribute of paragraphs.

More LibreOffice Help on Text Format (Search).

Press edit below your question if you want to add more information; also can comment an answer (Add Answer is reserved for solutions).

Check the mark (Correct answer mark) to the left of the answer that solves your question.