If there are 13 Wifi channels, can I only use 13 Wifi devices on the same room?
First of all, the U.S. only allows 11 of those 13 channels. Additionally, the original wifi developers made a mistake, of sorts, and signals within channels bleed over to their neighbors...
there are really only 3 channels you should use: 1, 6 and 11.
Keep in mind that applies to the 2.4Ghz spectrum. There's also the 5Ghz spectrum that has more channels, less contention (for now), and is supported for 802.11ac, but has less propogation through things like walls and trees. 2.4Ghz is old busted; 5Ghz is the new hotness.
That said, you can have far more than 3 devices on wifi at a time even on just the 2.4Ghz frequencies, because devices will share time on each channel. It's just like having someone listen to several conversations taking place at once in a crowded room: not everyone is talking all the time. If two people talk at the same time, the listener may have to ask one or both to repeat themselves. The more people you add to the room, the less total information you can pass around, because people will constantly interrupt one another at an increasing rate and the general background noise will start to become as loud the person next to you can easily talk. A good rule of thumb is around 25 devices per channel for casual browsing, but this can drop significantly for non-casual traffic like gaming, p2p file sharing, video streaming, and large file transfers.
In networking parlance, we say a wifi cell is unswitched and half-duplex, making it very sensitive to collisions. Wired networks typcially don't have these weaknesses (switched and full-duplex), and are also much less susceptible to random electromagnetic interference. While wifi is a "good enough" technology to use at home, serious networks or any serious application will do much better pushing as many people or as much network traffic as possible to a wired connection.
I run the campus network at a small college, and it's sad to see how many new students arrive this year who have never used a wire for network access. They think the notion of needing a wire is quaint, and don't understand the physical limitations involved, and why 80 devices (more than 2 per student on average) in dorm space the size of their parents' house doesn't work so well. Re-educating them about this is hard.
Wifi channels do not correspond to number of devices that can be connected.
Each channel corresponds to a frequency that the wifi devices work on, so if your router is set to use channel 11, then all devices that try to connect to is must also communicate on channel 11.
The number of actual devices that can connect on a given channel is limited by the software on the router and by bandwidth, as more devices are connected they all use a portion of the available bandwidth until the connection becomes near unusable due to having no bandwidth spare for communication.
Interference is more important than channel.
Each channel is actually wide enough to cover the two adjacent channels in each direction.
So, if you are looking for interference-free communication, you only get 4 channels with which to work.
However, there is more than just the frequency that you're dealing with in determining router connections. Theoretically you can have any number of wireless networks in an area and communication will still work.
However, having more than 4 networks properly spaced will result in decreased performance across all the networks in a given area.
Just complementing most of answears, I found that Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) should be the name of the technique used to share the same channel by a lot of users:
"If the channel is sensed "idle," then the node is permitted to begin the transmission process. If the channel is sensed as "busy," the node defers its transmission for a random period of time. Once the transmission process begins, it is still possible for the actual transmission of application data to not occur."
Just adding my 2 cents:
All Access points, and devices are sharing the channel. So if there are 10 access points and 200 devices on channel 6 (regardless of if they are yours or not) are sharing the capacity of the channel. For the G protocol that would be ~50 Mbps, for N ~150Mbps.
Devices and access points (or routers) time share sending and receiving data on the channel. Each device on the channel takes turns sending and receiving data.
Some advanced routers can communicate on 2 and 3 channels at once! This requires more compute power of course but it is possible. The really advanced devices are able to filter out devices that are not on its "network" and improve speed performance for it's devices.
Wireless N uses the 5Ghz frequency spectrum which is newer, which relates to less devices being on those frequencies.
To answer your question in short: You could have thousands of devices on your network; theoretically. All of the 13 computers (devices) will be able to access the internet at the same time.