Last Embrace

In a Mexican cantina across the border from El Paso, government agent Harry Hannan is with his wife, when he spots an informant he is supposed to meet in a few days. Realizing he is about to be attacked, he shoves his wife to the ground and starts shooting at the informant's companions who return fire and flee the restaurant. Harry's wife dies in the attack, and he suffers a nervous breakdown. He spends 161 days in a Connecticut sanitarium before being released.
On his way back to New York City, Harry stumbles and nearly falls into the path of an express train. He goes to the makeup counter at Macy's to retrieve his next assignment, but the assignment slip inside the lipstick case is blank. He accosts his contact who assures him that the agency probably does not have any work for him.
When Harry returns to his apartment, he finds it is occupied by a doctoral student named Ellie Fabian. She explains that she had a sublet arranged while she is in the last semester of her studies at Princeton University. Ellie claims that the housing office said the Hannans would be gone indefinitely. She gives Harry a note that was slipped under the door, but it contains only a few Hebrew characters that he cannot read.
Paranoid that he is being targeted by his own agency, Harry visits his supervisor Eckart, who assures Harry that the agency has higher priorities. Eckart insists that Harry is not ready to return to the field, but that he is perfectly safe. Harry notices that he is being surveilled, loses the tail and goes to the American Museum of Natural History, where Ellie is.
He gleaned information about her from their brief encounter. He gives her some money and urges her to stay in a hotel, because he fears she will be accidentally targeted. Ellie stays in the apartment despite Harry's request. When Harry wakes from a nightmare, he tells Ellie about the death of his wife. He takes a prescription pill, but spits it out, realizing that it is cyanide.
Harry takes the Hebrew note to a local rabbi who can only partially decode it. The rabbi informs the agency that Harry has visited him, and Eckhart orders Harry's murder. Ellie suggests that they take it to her friend at Princeton who specializes in Hebrew studies. On the train, Harry notices an old man and another agent looking at them.
At Princeton, Richard Peabody decodes the note for Harry and explains that it means "Avenger of Blood." Peabody has accumulated several notes, all attached to very peculiar murders. Harry is the first one to have received the note and lived.
The next day, Harry is lured to a trap by the other agent. He manages to kill the agent during a shootout in a bell tower. He encounters the old man from the train, Sam Urdeil. Sam explains that he is part of a committee investigating the blood murders. They investigate the various clues, and they piece together that Harry's grandfather owned a brothel on the Lower East Side of Manhattan.
In Niagara Falls, Ellie is dressed as a prostitute and lures a married man into a bathtub with her. As she has sex with him, she drowns him. As Harry and Sam put together their information, they are led back to Princeton. Harry realizes that Ellie is the one murdering men, on behalf of victims of white slavery like her grandmother. He drives up to Niagara Falls, where they have an emotional confrontation. She tries to kill him, but confesses that she loves him. He is conflicted, but he tells her that he will turn her in. Ellie runs from him, and the film ends with a prolonged chase through the hydroelectric power plant. It ends above the falls, where Harry grabs Ellie, but she struggles and ends up plunging to her death.

Question: How long does Harry spend in the sanitarium ?
Answer: 161 days.