cout rows of a view for new content and comments
count($view-&gt;results) will only give you the number of the results on the current page if using a paged View. Try using $view-&gt;total_rows instead, which will give you the total number of rows returned by the View:

return l($view-&gt;total_rows, 'new-activity/' . arg(2));