In most cases it is 1 Tblspn Per 5 Gallons. For a 30 gallon tank your looking at 6 tblspns.
It's important that you fully disolve the salt crystals in a cup of water before adding to the tank. Goldfish are gravel pickers and if you drop the salt crystals straight in they are likely to eat them which isn't the greatest thing for them to do.
Catx is correct in saying this helps the fish produce more slime coat. It won't harm the fish to do it now with a swollen eye. The aquarium salt will keep away bacterial infection by adding to their slime coat, the medication will remove the problem now, the salt should hold it away. Their slime coat is basically what protects them from infections and diseases, a bit like our immune system, it depends how healthy our immune system is as to wether we get a cold or not. Fish have a similar property with their slime coat.
Just to confirm, i added aquarium salt while treating my second Ram with "pop-eye" and her eye went down extremely fast and she survived the ordeal, whereas the first Ram i didn't add aquarium salt and he didn't make it through the medicating process.