According to MS Word,
Sentences that contain words used frequently in the document are given a higher score. I'm not sure that's the most accurate way to summarize anything, and in my experience, this is a pretty iffy algorithm.
It does not mean that only sentences can be highlighted as key points. If you use the 'frequently occurring words' in the headings, they too can be included in the summary.
To get the summary within 5 or 25 sentences, you just have to do some simple math and express the number you want as a percentage of the total number of sentences in the document. For example, in my test document I had 247 sentences. In the drop down menu, there are options only for 10 sentence summaries and above, or 10% of the document and above. The percentage has to be manually entered, so in this case if I want 5 sentences, I'd enter 1% (sadly only whole numbers are allowed, so I can only really get 4 or 6 sentences in my summary).
Note that the summary is only as accurate as you let it, so the more you want it to relate to your document, the more the number of sentences (or words) you'd want to include (which is why I suspect Microsoft gave us such limited options in their drop-down).