You can generally tell by a fish's behavior when they are unhappy....a lone schooling fish may swim around quickly and hide alot. They feel insecure which causes stress and will probably shorten thier life.
When you add these fish to a group of thier own kind, they feel more secure and safe and so are less stressed and tend to be healthier and more fun to watch.
I had a cory that I temporarily switched to another tank because I needed some gravel cleaning done in there and also wanted to see how the rams got along with it. This cory was very unhappy, all it did was swim up and down the side of the tank...constantly.....when I put it back in the 10 gallon....he swam right over to his/her buddy and the two of them just snuggled next to each other on the bottom of the tank for awhile before they both began swimming around the tank together. A much happier fella/gal. These are emerald green corys. These fish really like to be in groups of 5 or more...but even one more is better than being alone....as I found out with these two little cuties.