Pass the affiliate ID(s) to the referral count function to ensure pagination is properly set when filtering referrals table. #407