If you look at the $#relay mailer definition, you will see for example that it is defined as:
Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=2040,
So your question effectively becomes: Can $h be a colon separated list, and if yes, for how many hosts? To which the bat book replies in page 739:
Beginning withV8 sendmail, $h (possibly as returned by the parse rule
set 0) can be a colon-separated list of hosts. The sendmail program
attempts to connect to each in turn, left to right:
Here, it tries to connect to hostA first. If that
fails, it next tries hostB, and so on. As usual, trying a host means
trying its MX records first, or its A or AAAA record if there are no
For the actual limit one would have to look at the sendmail sources to verify if any exists.
There is second argument implied in
A=TCP $h which is omitted and this is the port number (assumed by default to be 25). You can have a host list and a single port, but I am not sure whether (or how) you can have a host list with a different listening port for incoming connections for each host on the list. For such an elaborate and tricky setup I would write another delivery agent that could make use of this.