Ignore words in word count

Let’s say I have text I don’t want to count in my word count but I want the rest of the text in a file to be included, I should be able to flag it and have an option to ignore the selected text in my word count goal.
Or maybe an option to ignore all text in a certain format like bold or italics.