Ignoring any Income Tax aspects (which weren't part of the original question) and considering Capital Gains Tax...
HMRC Internal Manual CG64702 refers to Statement of Practice SP14/80 and comments "You should not consider any restriction of relief where there is a single lodger but should consider doing so to an appropriate extent where there is more than one lodger" [emphasis mine].
A single lodger is not a problem in respect of Capital Gain Private Residence Relief. Two lodgers may affect entitlement to that relief.
The definition of lodger seems to be covered by SP14/80 too. It states "Where a lodger lives as a member of the owner’s family, sharing their living accommodation and taking meals with them, no part of the accommodation is treated as having ceased to be occupied as the owner’s main residence, and the exemption is not restricted at all." [emphasis mine].
...if I let a room to a couple on one room lodger agreement does that
count as one lodger or two?
I would be expect a couple to be two lodgers as a matter of fact, regardless of how some agreement might describe matters.
The above is only my rough understanding and I could only find that two lodgers might jeopardise the private residence relief.
Given the potentially large amounts involved please take some expert advice from a tax advisor.