Add an exclude directory function to the tab panel

Is it possible to add to the tab panel function to exclude directories that I don’t want to count.
Or is there a corresponding api that allows me to exclude a directory that I don’t want to count when counting all tags.