Portfolio diversification is one of these few concepts in which both, academics and practitioners, agree; at least in the basis. Having just one stock is too risky, whether you understand risk as volatility or as permanent loss of capital. On the other hand, the maximum diversification one can achieve in stock is owning a proportion of the whole market, that is, indexing your portfolio.
In the first case, losing all your money in the long-term is plausible (as Damodaran defines here), while incurring in huge losses with the indexed portfolio is possible, but highly improbable in the long run. The same occurs with volatility: the less the number of stocks, the higher the volatility, and vice versa. But, as it is well-known, generally, more risk implies more expected return, so, by holding just one stock rationally (i.e. holding the best stock in the market in term of expected performance), the expected return should be extraordinarily high, whereas the expected return of the wide diversified portfolio is mediocre (by definition, the return of an index is the one done by the average investor, excluding fees and transaction costs).
The origin of the risk of every stock can be divided in two different sources: systematic and individual events. The systematic risk is the one associated with the overall market, such as the rise in interest rates, the event of a recession or political issues. Even the most diversified portfolio is exposed to these events, so it is said to be a non-diversifiable risk. Thus, every investor must bear, at least, this risk. On the other hand, the individual risk is the one associated to each stock in particular, that is, related to the fundamentals of the company. For example, the misallocation of capital by the management team is an individual risk existing on every stock, since it may affect an individual company without causing an overall market risk.
So, is there an optimal number of stocks? Even assuming that each investor (individual or institutional) could invest an infinite amount in whatever the stock he prefers, there is not an optimal solution. Peter Lynch has one of the best performances ever, and he used to hold hundreds of stocks, while the richest men in the world have done their fortunes with just one stock (except Buffett, who holds a lot of companies).
Then, each investor needs to know his own risk tolerance, his investment objectives and his personal knowledge and circumstances.
A risk averse investor should hold more stocks than a risk lover one, as well as a conservative investor with a preservation of purchasing power objective should take less risks than a young and ambitious investor with little to lose.
In addition, knowledge is a crucial factor since, as Buffett says, risks comes from not knowing what you are doing. Being an expert allows the investor to concentrate his portfolio, while having little financial culture or lack of knowledge on any specific industry or company implies that the investor should diversify.
Moreover, each investment vehicle is different in regulation and circumstances. For example, while European UCITS must be diversified by law, hedge funds can be concentrated and leverage. As well, a mutual fund with a lot of money under management cannot concentrate the portfolio in just 10-20 investment ideas (as it happened to Lynch), while a small fund with a few million AUM can invest the main part of the portfolio in few stocks.
Definitely, portfolio diversification must be analysed in a context of risk tolerance and investment preferences and conditions. While there is not an optimal number of stocks, holding just a few stocks may be too risky for the average investor. Thus, as analyzing and monitoring a lot of stocks is not an available option for him, the optimal decision is investing indirectly through mutual funds, which are diversified and run by professionals. The question, then, is not what the optimal number of stocks is, but how to choose the best mutual funds.