An invalid volume directory count could be a sign of impending hard drive failure, or could have been a minor random glitch.
But if your iMac smells like something is burning, unless you're mistaking the smell of new electronics for something completely different, then you've got two options:
If it's still under warranty, back up any data that's not already backed up, then take it in to Apple right now, before it starts a fire and/or the hard drive dies.
If it's not under warranty, back up any data that's not already backed up, then take it in to Apple or another service provider right now, before it starts a fire or the hard drive dies.
Seriously--if it smells like something is burning, it probably is. A computer can sometimes continue to work through a catastrophic component failure, but the longer you use it the worse the problems are likely to get, up to and including a small broken component taking a bunch of other stuff with it.