In the Aggregator module, limit number of items per feed
This might not be the right way to do it but I solved this by using template_preprocess_aggregator_feed(&amp;$variables) and then slice the items using array_slice(). 

My items were stored at $variables['content']['items'] but there were two other hashtag variables stored in the beginning of the array so I had to add that to the total count.

function template_preprocess_aggregator_feed(&amp;$variables) {
  $number_of_items = 5;
  $variables['content']['items'] = array_slice($variables['content']['items'],0,2 + $number_of_items);
}