There are some good reasons that you want to restrict opening too many tabs in Firefox. For example, to prevent tabs from overloading and overflowing the tab bar, or to deal with the memory issue of your browser, etc. Here is how to set the maximum number of tabs that Firefox can open.
Max Tabs is a simple extension for Firefox that provides you an option to set a maximum number of open tabs in a window. By default, it’s set to maximum 10 tabs per window, but you can easily changes this value from its option page.
Max Tabs is restartless add-on, just install it, open the extension manager page and set the value you want. Interested users can download Max Tabs from the Firefox add-ons website.