The scrolling area is set up in an XSL stylesheet, not with PHP code, but it uses two particular values which are set within script 'std.list2.inc' at line 223:
// set variables to be included in XML output
$scrolling[$dbouter->getClassName()]['curitem'] = $dbouter->getPageNo();
$scrolling[$dbouter->getClassName()]['lastitem'] = $dbouter->getLastPage();
If both 'curitem' and 'lastitem' are set to 1 then there is only a single item to display, so there will be no need to any scrolling hyperlinks. If your code reads 7 records from the database then 'lastitem' shoud be set to 7.