If things are not adding up correctly, try turning it off and then on. If that does not work, make sure the iOS is up to date. If that still does not fix the issue, you can plug it into itunes and see what itunes says for the system. If things are still off, then it could be an issue where the iOS is not deleting temp files correctly. To fix this the best options is to do a restore through itunes, after backing up the phone to itunes or icloud. Then restore the iPhone from the backup. If that still does not fix the issue, then there is an issue with the back up and you would have to restore the phone again through itunes and set up as new. This would essentially flush the system of the glitch so that the storage capacity resets.
How to back up your iPhone, iPad, and iPod touch - Apple Support
Restore your iPhone, iPad, or iPod to factory settings - Apple Support
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support