I was hoping someone here could give me the benefit of their experience with tropical fish, in particular corys.
I have had two of them die in the past week.

It is a relatively new tank (Chistmas gift) and only 18 gallons, and has cycled. I used to have a 25 gallon tank years ago, so have some experience with the extensive trial and error that can come with setting up a new tank. I'll give you some info, re: the tank enviromment, etc:
Other fish - 3 glowlight tetras, 3 zebra danios, two platys (don't know what kind, but they seem a little aggressive toward each other and the other fish, and are food hogs.) There are no remaining corys. Using the 1 -
inch per gallon guideline, I figure I had 16-17 inches of fish in there, which is at the top limit.
Environment/filters - mechanical filter hanging on back of tank, underground biofilter all seem to be running well. Water is crystal clear and maintains a temp of somewhere between 78-81 degrees. Small, efficient heater rated for up to 20 gallons. Seems ok.
No live plants.
The corys seemed healthy when I brought them home and did well for the first five days or so. I did wonder if they weren't getting enough food because the other fish got it first, but sadly I did nothing about this. Also, I watched for any signs that the platys were harassing the corys, never saw it though the platys are pushy. However, the day before each cory died I found it resting up in the corner of the tank, behind the heater, actually touching it. (this was the top end of the heater, which did not feel warm to my touch). The following day, each cory died in the space of about three hours. Could they have burned themselves or caused some internal damage, or did they starve?
I know these questions aren't easy to answer without seeing the tank/fish, but your thoughts are appreciated. My first impulse to give the platys away, both because they are the two largest fish in the tank, and they are a little aggressive. I do not know the sex of the two platys, that didn't come up when I bought them and I didn't know to ask.
And it seems from what I've read here that I should have 5-6 of each of the danios and tetras. Is that right?
thanks again,
Brooks Waldhart