Alter Views query limit using views_query_alter
If it's only about the number of results to return, I think you could simply implement hook_views_pre_build() and do the following:

function track_click_views_pre_build(&amp;$view) {
  if ($view-&gt;name == 'click_list_days') {
    $view-&gt;set_items_per_page(YOUR_NUMBER_OF_RESULTS_HERE);
  }
}


Or inside hook_views_query_alter() you should be able to do:

$query-&gt;set_limit(LIMIT);