You can keep 4 in that size. Red Eyed Tree frogs are very social. My 2 will sleep side by side on a Pothos leaf. We have 2 other RETF but they are to small to be added to the terrarium. Hopefully in another month we can.
Just make sure you give them plenty of vertical space to climb. They spend little to no time on the substrate.