How many channels can you join?

Becuase the problem isn’t the number of channels you join.

The problem is the number of messages that could theoretically be sent.

You can join 1000 dead/quiet channels fine.
But you can’t join say all 50 of the “Top” streamers channels.

Twitch will disconnect you in the number of messages in the queue to be sent to you is too great.

A message here is not a chat message but any RAW packet of data from the server.
Usernotices, notices, timeouts, /me privmsg etc.

Sure you may have joined 1000 channels without issue, Twitch doesn’t enforce a limit.
You just may have a problem if 1000 people start talking in all 1000 of those channels at the same time.

As that is nearly 2,000,000 messages, (the message and extra notice/tag data that may occur or be sent in a separate message) you need to consume relatively quickly, or get force disconnected due to large buffer/message queue.

That’s why you should NOT join too many channels on one connection.