Constraining the number of config nodes

I am creating config server nodes for my custom node- I am following Is there a way to constrain the number of config nodes created? As an example, I would like to not show/enable "Add new config..." when there is already a config present. Or if that is not possible, I need to be able to validate the new config so that duplicate entries are not configured.