You should be able to use that code to create a select list to select the number of rows. However, you would still want to save the result in the session so it would be maintained when switching pages.
The code you supplied is just 1 of 3 pieces that have to work in conjunction.
1) The html that creates the select list
2) The code that saves the submitted choice into the session and sets the default value
3) The code that sets the number of rows in the recordset to use the session
Place that code you supplied onto your page where you want to use it. At that point you will have a select number of rows field that you then just have to tie into the recordset and session. Attach that page with step 1 complete, and I can comment on the code that needs to be updated for step 2.