We need more info. Is the inflow water coming in at a rate that will exceed the outflow rate of a single pipe?
Assuming the drawing is to scale, common sense (flow in is less than a single tube outflow, water level in cup will not move above the lowermost outflow tube) says 6
If the inflow is greater than the tube outflow then you need to factor in the tube length and difference of heights of the outflow tubs, tubing lengths, the change in air pressure between the top most and lower cups........
I think I did this problem as a computer science problem in civil engineering in college. Spent a lot of time at the punch card machine and seem to remember one guy screaming and running from the Sys admin desk (guy who takes your cards and runs the program) cursing something about dang thing will not compile.....
It was a recursive solution problem and he had infinite recursion ......
those where the good old days when you got to sit on the floor and wait for 20+ minutes just to find out you did something dumb and had to go back to the punch card machines and fix it (and other 20 minute wait)