I don't want to throw a wrench into things, but if you have even numbers of each, they can exist very happily caged together, or in a large aviary, once you get dozen or so of each, numbers do not matter so much. there is a huge aviary at the shelter that is the size of a very large walk in closet to give you a feel for size. You literally walk into it to clean and such. This is where parakeets and the tiels that are not super hand tame live very happily together.
At our home we have a fight cage that has 2 male tiels and 2 male budgies. Cam had been a single budgie and was so desperate to make a friend, he kept trying to interact with all the other birds. The day he landed on the java stand and wanted to share a bowl of food with the blue and gold macaw, I knew it was time to get him a set of friends that were more appropriate for him
We adopted Mitch from the shelter and added the 2 male tiels we had in the home. They all get along just fine, no real squabbles or problems and its been a couple months now. The key we would tell anyone is if that you should have at least 2 of each. First pics are various photos taken of me standing inside the shelter aviary taking pics, then the flight cage with the 4 are our guys, took couple tonight, but did not show everyone that great, but gives you an idea of a happy community home