Numbers,
the more you have, the more likely they are to exhibit their natural schooling behavior.
Five or six does not cut it, a dozen at least, several dozen, think big.
Space,
the more space you have, the more likely they are to exhibit their natural schooling behavior.
A couple of feet starts to make difference, now combine that with a broken line of sight and you've a nervous fishy.
Predators,
having a (perceived) predator lurking, the more likely they are to exhibit their natural schooling behavior.
Enough said.
...........................................
There is safety in numbers from predators, and no fish wants to be separated from the school.
Where're my buddies? Whoa! they're way over there going outta sight behind that log... Eeeeek! Predator! Hey guys! Waaaaaait for me!
.
.
.
.
.