I want to create a WiFi hotspot(access point) using Raspberry Pi. This is for my college project and I wanted to know how many devices can simultaneously access the WiFi hotspot on Raspberry Pi. I want to know the exact number. I want to use TP-LINK TL-WN823N 300Mbps Mini Wireless N USB Adapter (link: http://www.tp-link.com/en/products/details/cat-11_TL-WN823N.html).
No one can give you an exact number for "maximum connected devices" here, except perhaps if it is a limitation of the adapter (which has nothing to do with the pi). Such a figure would be meaningless anyway, since it is probably far higher than than could be actively serviced. There is no point assuming you can connect 20 devices if you only have the throughput to service 4 of them.
Network service is generally evaluated on throughput, not number of connections. You could have a large number of connected devices doing nothing, but if all of a sudden they all want to engage in transmissions as fast as they can, you might be down to a very small number (including zero1) of functional connections. The in-and-out-again throughput on the pi's USB bus will be half the maximum (~2240 Mbps), which is still greater than 300 Mbps / 2, so your pass-through max here will be 150 Mbps total for all devices. That is an optimistic number.
In theory, that means you could connect 150 devices at 1 Mbps. I am dubious the adapter itself will really allow for that (but again, this has nothing to do with the pi and you should investigate elsewhere, e.g., our larger sibling site Super User). If it did, you would have to severely rate limit them to prevent the problem I mentioned in the last paragraph regarding functional connections.
1. As you approach the maximum total throughput of the router bottleneck, the per connection latency grows without bound, meaning all devices on a busy network may grind to a halt and remain that way until some of them give up.