If any species of shoaling/schooling fish cannot be housed with adequate numbers that will benefit the individual fish, then it does not belong in the tank. Example, "6 chili rasboras, 6 neon tetras, 4 ember tetras" and "6 black neon tetras and 7 chili rasboras" is detrimental to all these species. Each of these needs double or more. And whereas 10 black neons should do well so far as just the numbers (all else being equal, and I am not suggesting a 10g is enough space) it takes more than ten for the nano fish like dwarf rasboras and ember tetras. Nano fish have a higher metabolic rate, and they need calmer surroundings than would larger fish that are more comfortable in the environment. Numbers play into this.
According to scientific evidence, the four ember tetras will be so stressed they will likely turn aggressive to each other and other fish, they may have a latency to even eat, and the stress if continued will without question result in an early death well short of the normal expected life term. Same probability applies to the other species. And solely because of numbers.
Considered abstractly--a group of 15 Ember Tetras in a planted (floating plants) 10g will fare much better and be healthier long term than will six or seven Ember Tetra in the same tank. There is just no substitute for adequate numbers. It has nothing at all to do with the biological system, water changes, etc. The fish with six are just too stressed and eventually it takes its toll.
I had a 10g tank, soft sand substrate, plants including good floating cover, no filter, no light (W facing window), weekly 60% water change. It housed 11 Boraras brigittae, 10 Corydoras pygmaeus, several bladder snails. There were two shrimp of some sort that arrived in the bag with the cories presumably. It ran like this for a year. I cannot talk to the fish, but I would suspect from what I could observe that they were healthy. After a year, I moved it away from the window (using daylight is not as absolute as tank light for plants) and added the light and a single sponge filter for mechanical filtration. Biological was certainly not an issue, the plants did this better. Over the years following, this tank served my pygmy cories who began spawning and there were 30 of them at one point. Fish health is primarily a matter of providing what the fish consider essential in all aspects of the aquatic environment.