there is no set maximum number of days you have to be in the Uk to get ILR, but dont spend too long out of the uk thou, as the uk is suppose to be your home, but max of 3 months in any 1yr and you shouldn't have a problem getting ILR or cititzenship later on.
as when it comes to appyling for citizenship this applies
Residential requirements
In order to demonstrate the residential requirements for naturalisation you need to:
have been resident in the United Kingdom for at least three years (this is known as the residential qualifying period);
and have been present in the United Kingdom three years before the date of your application;
and have not spent more than 270 days outside the United Kingdom during the three-year period;
and have not spend more than 90 days outside the United Kingdom in the last 12 months of the three-year period;
and have not been in breach of the