This depends on the council but in general, you will not require a HMO licence unless the council has applied for selective licencing.
So, to err on the side of caution when buying a 2-storey HMO, make sure you ring your local housing officers to enquire about the HMO licence requirements in your area and then follow their instructions.
At the very least, ensure that you have a fire alarm system, fire extinquishers and blankets together with following the normal health and safety precautions.
If you have more than 7 sharing in a 2-storey HMO, remember that although you may not need a HMO licence, you may need to apply for planning permission for change of use from residential usage to a HMO.