There's so much going on in your request. For starters, it is entirely possible that your son is not comfortable, and has been so uncomfortable for so long he really doesn't know what normal is. And an uncomfortable toddler-through-adult person will not be as cheerful, patient, or capable as one who is physically doing okay. (I have chronic pain issues, and have to make a conscious, adult effort to be calm and civilized on an hourly basis).
If his diarrhea is the result of some sensitivity (lactose or gluten intolerance, for example), that can definitely affect his mood and mental functioning, too. Many kids with ADHD, autism-spectrum disorders, etc., also experience food or chemical intolerances, and their behavior and cognitive capacities can improve remarkably once those issues are brought under control.
Two or three are awfully young to be working on academics, and there's a very real risk of discouraging a child's love of learning by trying to get them to "learn" reading, writing, counting or other subjects before the needed brain development has happened. And even if he "can" count, he may be (understandably) annoyed or bored with being drilled when he'd rather be playing in an age-appropriate way. Play is the single most important waking activity for pre-schoolers to engage in.
On the anger, scolding cars, is he imitating behavior he's seen from adults? Yelling and finger-shaking are common in 2-3 year-olds, and it's usually copying what they see as acceptable/desirable/effective behavior in grownups. Kids are great imitators, and learn more quickly that way than by verbal instruction (especially if the words don't match the pictures).
Time-outs, or any other form of correction, simply don't work equally well for all kids. An approach that has been almost miraculous for a number of young parents I've recommended it to has been the Emotion Coaching found in books like Raising an Emotionally Intelligent Child by John Gottman. You can also google that term for lots of useful information. (Here's one good link to get you started: http://www.education.com/reference/article/important-pare... .) This sounds to many parents like it will "take too much time," but with a little creative application and consistency, it saves enormous amounts of time and parental energy. Not to mention tears and rage from frustrated children trying to find their way past parental restrictions and punishments.
And then there's my all-time favorite parenting book, the practical and effective How to Talk So Kids Will Listen, and Listen So Kids Will Talk, by Faber and Mazlish. Every family I know who uses this book gets great results, sometimes turning around some genuinely frightening behavior and attitudes in one or more "problem" children. I'm on my third re-reading, and use the techniques all the time with my 4.5yo grandson. They work brillliantly.