The law states that you, as the landlord, must be using the property as an only or principal home, at the start and throughout the period of letting.
So yes, in theory, you can have two residences - for example, you may own a main home and rent out a part of it to a lodger, while also owning a holiday home that you visit from time to time.
But you can only have one main residence.
This is important, because if you rent out a room in a property that is not your main residence, your tenant should be covered by a regulated or assured tenancy, which gives them greater rights.