You've probably heard of people who speak large numbers of languages. Some such claims are genuine, others may be slight exaggerations. Some people, for example, will claim to speak languages even though they only have a smattering of them, I've done this myself at times, while others will not say they speak a language unless they do so really well. I now lean towards to latter position and try not to exaggerate my language skills too much.
There may be an upper limit for the number of languages you can really master. Exactly what this limit is varies from person to person, perhaps, though I suspect that if you want to speak them as well as your native language, the limit may be somewhere between five and ten.
On the other hand, if you're satisfied with a acquiring a good conversational and/or reading ability rather than complete mastery, you can probably learn a lot more languages. There are people, known as hyperpolyglots, who claim to speak 50 or more languages. How do they do it? Well, you don't have to be a genius or to have a gift for languages to become a hyperpolyglot, according to this article. In fact anyone could become a hyperglot, and you don't have to have a high IQ or a special gift. Instead you need endless reserves of enthusiasm, dedication, interest, patience and focus, as well as a willingness to make mistakes and learn from them. Some hyperpolyglots devote their lives to languages and never stop studying them.
If you're learning languages for practical reasons, it's probably best to concentrate on one or two and to learn them really well. If you just enjoy learning languages though, why not try and learn as many as you can.