What a fascinating word "wit" is! As a noun, it comes in both a discrete and continuous varieties. (English teachers like to use the words "countable" and "uncountable", but I avoid those words because I have trouble keeping them straight.) You can have "much wit" or you can have "a wit". Shakespeare believed there to be five wits, or specialized forms of intelligence: common wit, estimation, memory, imagination, and fantasy.
Those five "wits" give us a good idea what "wit" means. It is intelligence, but not just any intelligence. It is *sharp*, *precise* intelligence. What a shame it would be if you lost all of them! Don't lose your wits!
Sense of humor is a special kind of intelligence. It is a type of sharpness. That's why funny people are "witty".
On the other hand, being without wits (or without "wit" - you really can't go wrong - don't worry about whether "wit" is countable or not - the word likes to challenge your wits, or wit, or whatever) leaves you "witless", which is a synonym for the modern terms "clueless" or "foolish".