Alright first things first. If it were me, I would put the timer check first, that way if an interrupt occurs, and it is not the timer, it MUST be a portb interrupt. That way you can lose the big 3 way or check.

Next up on my chopping block are the 3 IF's. is there any way for more then 1 int flag to be high at the same time? and if there is, you will do nothing in the ISR because of the AND checks. I would think you will have the correct results by simply checking each flag, 1 at a time and doing whatever there. These 2 things may not improve your current problem, but will certainly have bearing when that wheel gets going.

Now last, I realize the LCD part is just while debugging, but put it before the b port checks. this way you will do the "long" time stuff, then inc the counts based on int flags, then clear the flags. As it now, there is a possibility the int gets called for "b", by the time you get to checking, R flag is now set also. both counts should get updated but they won't. then you clear all 3 flags, so 1 could get missed.

Thats all for now, See if any of this helps.