Showing ones lack of knowledge around here is not a problem. We all start somewhere. Refusing to admit ones lack of knowledge, on the other hand... Anyway, we'll make this really easy. And I'm moving the thread to a somewhat longer lived pastebin site:
Note the following two "user-configurable" variables at the top of the code block:
$showposts (set to 10)
$firstposts (set to 5)
I also commented throughout the source, but ask if anything isn't clear.
EDIT: Revised the pastebin code as I needed to comment out a few functions for plugins I don't run. They are comment-free in new pastebin entry.