You ideally want to own around 20–25 stocks, preferably divided among different industries, market capitalizations, geographic regions, and so on, to give you diversification. I realize not everybody can start with that number of stocks, so you may have to build toward that over time.
I also recommend that you put no more than 5% of your investable dollars into any one stock. It’s a sensible way to make sure unexpected losses don’t disproportionately impact your entire portfolio. For example, say your investment portfolio is worth $10,000 and you have 5% ($500) of that in stock ABC. If ABC were to drop by 50%, you would lose $250, which is just 2.5% of your overall portfolio.