For MODBUS, VALID slave addresses are 0-247, where 0 is for broadcast.
The maximum also depends on the PHYSICAL network.
For RS485 networks, depending on the design, a "typical" maximum is 32 nodes, however, with proper design this can be increased. Also, buffer transceivers can be used to extend the network.