The 183 and 91 day Rules.
The Inland Revenue operates two rules regarding the number of days that you spend in the UK each year. These are the 183 and 91 day rules.
If you are in the UK for more than 182 days in any one tax year then you will certainly become Resident in the UK for that year. If you average more than 90 days in the UK for a period of time then you will become both Resident and Ordinarily Resident in the UK.
This averaging business depends rather oddly on your state of mind. If on a given day, you expect to break the 91 day rule for the next four years then you immediately become Resident and Ordinarily Resident. But, if you do not expect to break the rule over a four year period then you do not actually become Resident and Ordinarily Resident until you actually exceed the average on a four yearly basis.
You must count the number of days in which you are physically present in the UK. In general, you do not count the day of arrival or the day or departure. However, this is not necessarily always the case. The Inland Revenue actually state that this is "The normal rule." Consider a person who travels to the UK every weekend. Arriving on a Friday and leaving on a Sunday each time. Under the "normal" rule, this person is present for 52 days each year but, if the arrival days are counted, the person is present for 104 days each year and thus falls foul of the 91 day rule.
Indeed, if you take full advantage of the rule and only ever travel at the weekends, it would be quite possible to be in a position where you fall foul of the 183 day rule on one reading of the regulations but, on another, stay clear not just of that rule but also of the 91 day rule!
Personally, I'd avoid pushing this one to its limits. Remember the mindset that writes the guidence notes. If the arrival and departure day exemption was cast in stone, the guidelines would not say "The normal rule" so it is fair to assume that sometimes that tax man will decide that these days do count.
There is another exemption. Days spent in the UK as a result of, for example, illness affecting a member of your immediate family might not be counted towards your 91 day rule calculation.