This question needs answering so you understand the extreme importance of having a decent-sized group when it comes to a shoaling/schooling species. This applies to all such fish, which includes all the tetras, rasboras, pencilfish, hatchetfish, barbs, danios, loaches and many catfish (like cories).
These fish live in large groups. This provides safety, but it also (depending upon the species) may have benefits relating to feeding. It may be a social issue...Corydoras for example are highly social fish, they literally chum around together to be "happy" as we would consider it. Some species develop strong hierarchies within a group...botine loaches come to mind. In all of these species, this "expectation" for a group around them is part of the genetic makeup of the species; it is not learned, it is an inherent need. If this is not met, it causes problems, sometimes deadly, for the fish.
Studies have now proven that shoaling fish become more aggressive when they are not in a group. Fish that are normally peaceful, say neon tetras, will show clear signs of aggression. Fish that are naturally somewhat aggressive, like Serpae Tetra and Tiger Barbs, become very aggressive. This is solely because of the numbers. There are other signs too. Fish are more "normally active" when feeding for example, if they have a good-sized group of their own.
Fish that are not within a good-sized group will be stressed. At the very least this weakens the fish. And stress is the direct reason for about 980% of all disease in aquarium fish.
Reearch the species to understand their needs, then be prepared to provide for those needs. This is the way to success with healthy fish.