Better way to count packages