There is no universally accepted ideal number of keywords for the meta keywords tag. However, including too many keywords can actually harm your website's ranking and make it look spammy to search engines. It's recommended to keep the number of keywords to a maximum of 10 to 15, and make sure they accurately describe the content on your page. Keep in mind that many search engines, including Google, do not use the meta keywords tag in their ranking algorithms.
While in the past, the meta keywords tag was commonly used by search engines to identify the topic of a webpage, it is no longer a significant ranking factor in most search engines, including Google. In fact, Google officially announced in 2009 that they do not use the meta keywords tag for ranking purposes.
Instead, search engines now rely more on the actual content and relevance of the webpage to determine its ranking. Therefore, there is little benefit in spending time and effort optimizing the meta keywords tag.
However, if you still choose to include the meta keywords tag, it is generally recommended to keep the number of keywords to a minimum and focus on relevance and accuracy. A reasonable range could be 5 to 10 keywords. This allows you to provide a concise description of the main topics covered on the page without overloading it with unnecessary or irrelevant keywords.
Ultimately, while the meta keywords tag may have played a role in the past, it is not a significant factor in search engine optimization (SEO) today. It is generally more important to focus on creating high-quality, relevant content that users and search engines will find valuable.