How can certain sections not be counted?

A luxury need :slightly_smiling_face:

is there a possibility when counting words/characters to omit certain sections, because they are, for example, specially/differently marked?

image

Example:

This text is to be counted.

This text should not be counted because it is formatted in a certain way.