May be a stupid question, but is there a maximum number of years a contract can be?
I don't think so. You usually get 4-5 year contracts for relatively young players you've invested heavily in, but sometimes you'll get players with much longer contracts as well. I think James got a 6 year contract from RM? Or was that Kroos?
Usually it's not in a club's interest to offer too long a contract because it exposes the club to risk - e.g. long term/career ending injury to player.
It's also not always in the player's best interests to sign too long a contract if they feel that their performances can get them a better deal later on.
In Sterling's case, I think the club probably wouldn't want to offer him say, a 10 year deal because Sterling's agent would probably want him to be paid £250,000/week at the age of 19, if not more. Sterling also wouldn't want to sign a contract as long as that because when he hits his prime in 5-6 years, his value in wages might be a great deal more than £250,000 a week.
Anyway, I think Sterling's contract runs until the end of the 16/17 season, which means about another 2.5 years left. Given that he's basically five times the player now than he was than when he signed his last extension, it's definitely time for a new contract. A good outcome for us would be if we managed to keep him to a ~£100,000 a week contract until he's about 22-23, at which point if he continues his development we can offer him the silly contract that the likes of Rooney, Aguero, Suarez et al have. On performances alone, he's probably worth that £100,000 a week. But I think his agent will be looking for us to shell out a fair bit more given his age and likely potential.
We don't have the strongest bargaining position though. Interest in his services, even ignoring all the rumours, are likely to be very high. The best thing we can hope for is that the strength of his relationship with Brendan will give us some leverage to keep his wages at a manageable level for this contract.