Modbus TCP, as a protocol does not limit the number of masters or slaves you can have on a device or network, so it is all up to the device. It makes more sense to call the masters clients and the slaves servers, because the slaves have the data registers and listen for connections from masters, so I will use server/client terminology.
You can technically have 247 servers on each TCP port, and there are 65535 ports per IP address; that's around 16 millions servers per network interface. You can have infinite clients on a device, the only limiting factor is device CPU/RAM. Communication only works between a client and a server, servers don't talk to each other and clients don't talk to each other. If a software package or device chooses to only give you 1 client and/or server, that is a completely arbitrary limitation of the product you are using.
ModbusTCP communication works by a client opening a TCP connection to a specified IP address and port number (this is called a socket). Once the connection is made sends a standard ModBus command to that port and the command format still contains a spot to say what node number you are talking to. This is how you can have multiple servers on the same port. The server responds and usually the client closes the socket to make the connection available to a different client. Typically though, it is much easier to simply have one server on the port that responds to all node numbers, so many implementations only allow the 65535 servers per network interface. Others require you to use a certain port, but still let you run 247 servers on it; sometimes these setups are sophisticated and can handle multiple client requests on different ports and direct them to the "same" server. Unfortunately, most implementations are hack jobs that hard code the port and node number, limiting you to one server per network interface. Still, there is no reason to limit the number of clients (that's like a web site only allowing one visitor at a time, it doesn't make sense).