GOV.UK describes an HMO as a property rented out by at least 3 people who are not from 1 household but share facilities like the bathroom and kitchen. The mandatory licence rule is tighter: it usually applies at 5 or more people in more than 1 household, with shared facilities. A property can therefore be an HMO without needing a mandatory licence.
Count the people who live there as their only or main residence, not short-stay guests. A couple is usually 1 household; three friends are usually 3 households. If you are unsure, use the licence risk checker and then confirm with the council.
Useful links
Guidance only, not legal advice. Only the council can decide whether a property needs a licence, and the law can change. Check the linked GOV.UK pages and your council.