well now techically both of you, the fish stores will tell you anything to make a sale. Being overstocked is not good, it causes tank crashes, ammonia spikes, and other issues (including fish death). Petsmart will tell you that a goldfish can go in a 10 gallon, while we know that it needs a substantially larger aquarium for proper health.
Also Nayuls39, i would reccomend a bigger tank for both fish, the goldfish has an extremely high bioload and could become stunted in there.