Card counting in blackjack…doesn’t this work in the dealers favor too?

 
 

When you are counting cards in blackjack, and you come to a point where you know there are more face cards in the deck… doesn’t this work in the dealers favor too?

How does card counting work?

 
 

Even though you think you have the cards counted, how can you be so sure??? There are 52 cards in a deck, don’t the dealers use 2 or 3 decks??? How can anyone be so sure that they can bet and win?

Why does this not work for roulette?

 
 

In roulette, if you place a bet on the color black, you double your bet. The color black comes up slightly less than one time in two (on average). So theoretically, if you kept doubling your bet you would always come out on top, as long as the colour black came up once in a while. Why doesn’t this work in practice? (It doesn’t–I tried it!) Leaving out the possibility that the game was fixed.
I mean, the idea is that if you lose, you double your previous bet and keep doubling it until you win. Then you go back to your initial stake and start again.

How does an electronic roulette work?

 
 

I mean… how does it work from the technical point of view. Does it have a CPU who decides which number comes next using a random() function or how? Does it store it’s numbers/wins ? etc.