there's no such thing as a safe number of gallons for a cohab with piranhas, there will always be a big risk involved. sometimes small, fast fish like neon tetras can be put with larger piranhas, but it's not always successful. cichlids are usually alot harder to pull off a successful cohab with because there are alot of territorial issues which will lead to fighting and death. people may tell you that something they've tried has worked but that in no way means that it will work for anyone else. i guess you're free to try whatever you want to try, but in the long run there will be losses due to aggression, so just make sure that you're prepared for that.
I had 4 6 in. RB's that killed and ate a big nasty 8 in. Wolf FIsh. Had them together for months and one day things went wrong. The heater was accidentaly at 84F at the time and I didn't feed them for a day. Just the head was left!!