When we create a site either through UI or OM, it will not come as a tab unless you check the option ‘Site Actions-->Site Setting-->Navigation-->Show subsites to true’.
On checking the option results in displaying all the subsites as ‘Tabs’. If you want to hide some of them programmatically, you need to change the ‘__GlobalNavigationExcludes’ property from the property bag of SPWeb object.
Consider I have a site with 10 subsites, I enabled the option Site Actions--> Site Settings-->Navigation--> Show subsites to 'true, I can see now 10 addtional tabs, If I say SPWeb.Navigation.GlobalNodes.Count wont return a value approx equal to 10.
SPSite site = new SPSite("http://nishandv3:100/Sites/DevSite/");
Hope this helps!