It executes the correct number of times. The problem is with power=base*base. No mater how many times you execute that, if base is 5, base*base=25. I would change the code to start with power=1, and put power*=base;
Also, please use code tags.
You never updated the value of power.
Change power=base*base; to power+=base*base; and add power = 0; after count = 0;
I don't know if you declared count as an int before main, or not, but I would add it to your list of declarations before your while statement. Keeps everything in sight, that way.
While your way works, try and avoid using while loops in place of for loops. It's easier to follow for most people. Granted that's a style nitpick and people like doing things differently, but doesn't...
for (int i = 0; i < expo; i++)
...seem more definitive than a while loop? Plus you also save an insignificant amount of memory overall even if not during the loop.