Revolver

Dorothy Macha (Ray Liotta) is a gang boss involved in illegal gambling all over the city. With the help of three goons, known as "the three Eddies", he controls several games that take place in the underground. On one occasion, just before a big game, Macha loses his card man. With no chances left, Macha asks for help of Jake Green (Jason Statham), a card man with a good reputation underground. When Jake refuses, they harass Jake's brother, Billy (Andrew Howard), and Billy's family to convince Jake to play. He succumbs and plays the game, which he ends up winning. The loser, a high roller named George, insults Jake's mother and Jake responds by shooting him in the foot, igniting a gunfight in which the game's money vanishes.
Two weeks later, Jake's name is mentioned and he is brought in for questioning by the police. Taking precautionary measures, Macha sends the three Eddies to Billy's house where they threaten his niece. Billy's wife reacts poorly in the situation and is accidentally shot. Jake does not give Macha's name to the police to protect Billy and his family and ends up sentenced to prison. He is given a choice to either spend 14 years in general prison population or 7 years in solitary confinement. He chooses the latter.
During his seven-year stint imprisoned in solitary confinement Jake learns of a specific strategy (referred to as "The Formula") that is supposed to lead its user to win every game. The Formula itself was discovered by two unnamed men who inhabited adjacent cells on either side of Jake's own. They are referred to as a chess expert and a con man. During the first five years of his seven-year sentence, the three men communicated their thoughts on confidence tricks and chess moves via messages hidden inside library books, such as The Mathematics of Quantum Mechanics.
The chess expert and the con man plan to leave their cells simultaneously, and promise to take Jake with them. But when they disappear from their cells, they leave Jake behind to serve the remaining two years of his sentence. When Jake is released, he finds that all of his possessions and money have been taken by the two men with whom he had shared everything. Still, he has The Formula, and he goes about making a lot of money at various casinos. Two years later, Jake has garnered a reputation that leads many casinos to fear his freakishly good 'luck', and he is blacklisted by many casinos in fear that he will earn money in them. The Formula applies to any game, and is often exemplified by Jake's apparent mastery of chess. The story revolves around Jake's epiphanic awakening, as he learns how to apply the Formula to the 'game' of life.
Approximately two years after his prison release, Jake, Billy and their other brother Joe walk into one of Macha's casinos. He is recognised and "all the tables are closed" to Jake and company. But Macha promptly calls them up to a private area of his casino where a high rollers' game is currently taking place. As Jake had a phobia of elevators his brother refuses to let him ride in one. Jake bets Macha a fortune on a chip toss, and wins. This hurts Macha. As Jake says "nothing hurts more than humiliation and a little money loss". Macha suspects that Jake, who seems unafraid of him, will be out for more revenge. As Jake and his brothers leave the casino, a man hands Jake a card and tells him that he can help him. Jake, who has a fear of enclosed spaces, decides to take the stairs. In the stairwell he looks at the card and then collapses, falling down the stairs. The card is revealed to read "Take the Elevator". Jake is rushed to the hospital. The doctors report he is very ill but do not disclose why he had the blackout.
Macha puts out an order for a hit on Jake. Jake arrives home, without Billy, to be welcomed by one of Macha's hits. However, on his doorstep there is another card, which says "Pick This Up". As Jake bends to retrieve the card bullets fly over his back. As the shooting continues, the same mysterious individual called Zach (Vincent Pastore) arrives and rescues Jake who is the only person to survive the hit. Zach introduces Jake to his partner, Avi (AndrÃ© Benjamin). They offer him a deal: they will take all of his money and he will do what they say, no questions asked. In exchange, they will protect Jake from Macha. In the course of their proposal, they show Jake his medical file, which they have mysteriously obtained. It indicates that the blackout occurred due to a rare blood disease which will cause his death within three days. Jake suspects a con. The mysterious men later reveal that his money will be used to fund their loan shark enterprise.
Sam Gold is seen to be the 'king' in this chess game of gang warfare. He is the ultimate figure that all men are supposedly aspiring to be. Sam Gold is revealed to be an ultimately powerless cipher, whose power is granted only by those who invest in him. He represents ego and self-investment. He is the personification of greed. Actually there was no such a man called Sam Gold, it was actually Avi and Zach . It is revealed that Avi and Zach were Jake's "neighbours" during his years of incarceration. They have forced Jake to "induce head pain to engage the enemy" by making him give his money away under the principle that "nothing hurts more than humiliation and a little money loss". They are inflicting this form of 'premature enlightenment' upon Jake because, according to them, he was not ready to hear how hard this process of liberation was going to be while in prison. It was because of this that they left without him.
Avi attempts to get Jake to understand the nature of the ego. He tells Jake "the greatest con that [the ego] ever pulled was making you believe that he is you." This is seen to be the 'ultimate con', in that no-one wants to sever their connection with their ego, because they refuse to challenge their own lifelong investment in it. In the end, Jake also steps off the proverbial chess board by making a conscious effort to reverse everything his ego tells him to do. This is seen to be the truest and most fundamental application of the Formula. The characters of Jake, Zach, Avi and Sorter (Mark Strong) are seen to ultimately reject the ego's 'rules'. The character of Dorothy Macha is seen to succumb to them.

Question: How many years was Jake's stint in solitary?
Answer: Seven years