Teams can have up to 30 private channels but when a private channel is deleted, it will still count as one of the 30 channels until 30 days after it is deleted, when it will be purged from the team.
Private Channel memberships can be separate and even the Team Owners can be excluded from their membership (though we advise against this to avoid any instances of 'orphaned' channels). As well as generic channels shared with your entire team, there are two 'special' Teams channel types that allow you to control access, and share content safely with people outside of your team.