Pass no. of pages arguement to Drupal views pager
I still don't quite get what you are asking about, but you should be able to examine $view-&gt;pager in a hook_views_pre_build and do what you want.  For example, this is a snippet of code I have used in Drupal 6 and Views 2 to set the number of items per page:

function mymodule_views_pre_build (&amp;$view)
{
    if ($_GET["perpage"]) {
        $perpage = check_plain($_GET["perpage"]);

        if (is_numeric($perpage) &amp;&amp; (int) $perpage &gt; 1) {
            $view-&gt;pager["items_per_page"] = (int) $perpage;
        } else if ($perpage == "all") {
            $view-&gt;pager["use_pager"] = false;
            $view-&gt;pager["items_per_page"] = 0;
        }
    }
}