Well it could be a few different things causing the problem. Here are a few things to try/look for.
1. It could be a temporary phone problem.
To see if it is just a temporary phone problem, "Reboot" the phone. If that does not help you can try a "Soft Reset" by taking the battery out for about 30-45 seconds and then restart the device. Then try remounting the card.
2. The microSD card is not supported by the device.
Check the specs of the card you are trying to use. Make sure they are the same as the phone allows. Most cards available are supporty by the S4, but there are brands that is just doesn't like.
3. Either the microSD card or the slot was damaged.
Check the microSD cards connector and make sure it is not damaged, missing, corroded, etc. After making sure it is ok, then check the cards slot on the phone and make sure there is nothing wrong with it.
If the card(s) are damaged, then just replace them. If the slot is damaged, then you would need to have it replaced. If the phone is under warranty, I would contact the manufacturer to see about replacing it. If it isn't under warranty, you can see about replacing it yourself, or paying someone/somewhere to do it for you.
4. An application is using the microSD card.
Lastly, there could be an app on the phone that is causing the problem. Some third-party apps can cause conflicts. Try testing this out by running the phone in "Safe Mode" and see if the SD card can be mounted then. If it can, then you need to figure out which app is causing the problem.