IF contains([invoice type],"don't count") THEN 0 ELSE [Number of Records] END
This should do the trick. Just replace don't count with what you are trying to not include. Notice that I have intentionally omitted an aggregation here because I presume that your view will not be at an invoice type level of detail.
After this field is created, simply add it to your view to get the count excluding the text you don't want.
Thanks Dan! I struggle with the syntax on these calculated fields. Good to know I can count on the tableau community to help me out.
Always feel free to mention me in a post. I will always do my best to get to it.