How many type ratings are pilots allowed to hold at once?
There is no limit to the number of type ratings that a person can hold. The world record for most type ratings held by an individual currently stands at 105!

For safety reasons, most airlines only allow a pilot to be currently assigned to two aircraft types at one time so that they don't start to confuse the different airplanes and mix things up. This isn't a regulation though, at least in the US.

In your example, those airplanes are the same type so would only count as one of the two that they could be assigned to, but this will vary based on individual airline policy and the complexity of the differences between the actual aircraft involved.