The referral count is based on the number of appointments with a status of Attended, plus the number of "prior appointments" you specified when creating the referral ("prior appointments" count towards the limit but are not appointments on your Halaxy calendar).
You can quickly check which appointments are linked to the referral by navigating to the patient's Funding page, then hovering your mouse cursor over the "appointments attended" part of the Limit column:
From within the popover, you can click to jump to any appointment or invoice shown. From the Appointment Information panel or the invoice, you can modify the referral details and unlink the referral if needed.
To edit the number of "prior appointments" (which count as part of the limit but are not appointments in your Halaxy calendar):
Navigate to the patient's profile and click the Funding tab.
Expand the patient's claim under the relevant funder, then click the Edit (pencil) icon next to the referral you wish to edit.
Click Add prior appointments. A new field appears where you can enter the number of prior appointments to count towards the limit.
RESULT: The appointment limit should now include the number of prior appointments you specified, along with any linked appointments in your Halaxy calendar.