The number of stars you receive at the end of a battle is determined by how many of your heroes are still standing. A victory with all the heroes alive grants 3 stars. A single "KO'd" hero results in 2 Star, and 2 or more "KO'd" heroes gives 1 Star.