It just so happens I've been down this exact rabbit hole before. There are a few pieces to this puzzle.
The number of CIP connections are no longer really* a factor on the 5370 Compact Logix platform. Instead, you are limited by "nodes". Each device in your ethernet tree is a node. The 1769-L36ERMS supports 48 nodes, so in theory you could have 48 racks of 1734 safety I/O hooked up. Of course, that assumes you don't need anything else at all in your ethernet tree.
(*the number of nodes isn't
really a factor because they now support such a large number of CIP connections that you're extremely unlikely to hit that limit before you hit the node limit for your particular controller. However it may theoretically still be possible, particularly if you had a very large number of safety I/O modules in the picture. Refer to the first technote linked below, and my comments on using IAB at the end of this post)
There is, however, a limit to the number of CIP connections you can made to a 1734-AENT itself. A series B 1734-AENT can support 31 CIP connections - but only if the rack only contains standard modules. As soon as you have safety modules on the rack, it drops to a limit of 20 CIP connections. I have no idea why this is the case, but it is.
As others have said, you can only use a rack optimised connection for standard, digital I/O modules. Safety modules (and analogs) require an individual connection per card. So you have to do a bit of math to work out how many connections you need to connect to all the modules on your rack.
Now, a safety
output module requires
two connections per module. Why? Because you need both input and output data for a safety output module. Output data because (obviously) you need to be able to turn on the outputs, and input data because, in a safety application, you need to read back the status of your output module to make sure the card is healthy and communicating and otherwise OK. So that means you're limited to 10 1734-OB8S modules per 1734 I/O rack.
Input modules, by default, also use two connections - input and output data. Input data because (obviously) you need to be able to read the safety inputs, and check the module status/validity. Output data because you can configure them to use the test pulse outputs as standard outputs or muting outputs, and if you do that, you need to be able to write to those outputs. So by default, you're also limited to 10 1734-IB8S modules per 1734 I/O rack. Of course, there are limited scenarios where you actually
need to use the test pules as anything other than actual test pulses - and if you're only using them as test pulses, you don't need output data to the card. So in that case, you can set the module to use input data only, and then it only uses one connection. So in theory, you could use up to 20 1734-IB8S modules on a single 1734 I/O rack.
So you end up having to do a bit of math. You could have a rack with 10x 1734-IB8S with input-only connection (10 connections), 2x 1734-IB8S with input and output connections (another 4 connections), 2x 1734-OB8S (another 4 connections) 1x analog input module (another 1 connection) and 30 standard digital I/O modules (1x rack optimised connection), for a total of 20 connections. That's 20 connections, so to that rack you could add plenty more standard digital I/O modules under the existing rack optimised connection, but zero other modules.
Then there's the matter of bus power. The 1734-AENT provides 1000mA of bus power, and the 1734-AENTR provides 800mA. Safety I/O modules are bus-power hungry - 110mA for each 1734-IB8S and 125mA for each 1734-OB8S (assuming both are series B). So you can only put 9x 1734-IB8S modules on a 1734-AENT, or 7x if you're using a 1734-AENTR. The numbers are smaller again for 1734-OB8S modules. Once you run out of bus power, you need to add a 1734-EP24DC to the rack, which gives you another 1300mA of bus power to play with.
If you think you might be sailing close to the wind, your best bet is to fire up Integrated Architecture Builder and drop in your configuration. It'll tell you how you're tracking, and suggest things you can change if needed. It will flag connection limits within your 1734 rack, bus power limits on your 1734 rack, and both node limits and CIP connection limits on your 1769-L36ERMS.
References:
CompactLogix 5370, 5380 & ControlLogix 5580 Controller Nodes on an Ethernet/IP Network
ID: QA15678 | Access Levels: Everyone
How many Point I/O modules can the 1734-AENT or 1738-AENT support?
ID: IN2188 | Access Levels: Everyone
1734-AENT/R and 1734-IB8S - Number of CIP connections being used
ID: QA8130 | Access Levels: TechConnect
1734-IB8S Module: Reducing the Number of I/O Connections
ID: QA14865 | Access Levels: TechConnect
POINT I/O Power Specifications and Facts
ID: QA3486 | Access Levels: TechConnect