First look at these two previous articles about customizing popular posts gadget:
Shuffle Blogger popular posts and
Excluding specific popular posts in Blogger.
If you exclude posts from popular posts gadget, then you don't have exact count of popular posts – the count depends on how many excluded posts were in the list.
With this hack you can shuffle and then limit the count of popular posts. If you already have installed the shuffle hack, replace it with this code. You can put this code in a HTML/Javascript gadget, or in html template before </body>.
This hack is installed on this blog, I use 10 popular posts, from which I exclude the current post user is viewing, and some others. Then the list is shuffled and limited to 8 entries. Modify the popcount variable in the script to get a different amount of posts. In my MS-potilas blog I use five popular posts, picked from ten posts minus some possible excluded posts.