ANO Art 79
79 (1) Every member of the flight crew of an aircraft registered in the United Kingdom and
every person who engages in flying for the purpose of qualifying for the grant or
renewal of a licence under this Order must keep a personal flying log book in which
the following information must be recorded
(3) The information recorded in accordance with paragraph (2) must include:
(a) the date, the places at which the holder of the log book embarked on and
disembarked from the aircraft and the time spent during the course of a flight
when the holder was acting in either capacity;
(b) the type and registration marks of the aircraft;
(c) the capacity in which the holder acted in flight;
So long as you meet the above requirements, the hours count. Insurance, flight plans etc are irrelevant. If the information in your log is fraudulent then there are appropriate fines. If the aircraft is above 450 Kgs and the other pilot didn't log it as PIC there is no problem. Even hours flown in a stolen aircraft would count because the requirement only measures "experience"