Question: How many episodes were there of the TV series where Julianna Margulies had the role of Carol Hathaway ?

Context:
The Good Wife
The Good Wife is an American legal and political drama television series that aired on CBS from September 22, 2009, to May 8, 2016.
 The series focuses on Alicia Florrick, the wife of the Cook County State's Attorney, who returns to her career in law after the events of a public sex and political corruption scandal involving her husband.
 The series, created by Robert and Michelle King, stars Julianna Margulies, Josh Charles, Christine Baranski, Matt Czuchry, Archie Panjabi, and Alan Cumming, and features Chris Noth in a recurring role.
 The executive producers are Ridley Scott, Charles McDougall, and David W. Zucker.
 "The Good Wife" is a heavily serialized show featuring several story arcs that carry over several episodes, as well as stand-alone procedural storylines that are concluded by the end of each episode.
 The serial plots have been especially showcased in its highly praised fifth season.
 This is a rarity among "The Good Wife"' s broadcaster CBS, as most of its shows are procedural.
ER (TV series)
ER is an American medical drama television series created by novelist and medical doctor Michael Crichton that aired on NBC from September 19, 1994, to April 2, 2009, with a total of 331 episodes spanning over 15 seasons.
 It was produced by Constant c Productions and Amblin Television, in association with Warner Bros.
 Television.
 "ER" follows the inner life of the emergency room (ER) of fictional County General Hospital in Chicago, Illinois, and various critical issues faced by the room's physicians and staff.
 The show became the longest-running primetime medical drama in American television history.
 It won 23 Primetime Emmy Awards, including the 1996 Outstanding Drama Series award, and received 124 Emmy nominations, which makes it the most nominated drama program in history.
 "ER" won 116 awards in total, including the Peabody Award, while the cast earned four Screen Actors Guild Awards for Outstanding Ensemble Performance in a Drama Series.
Canterbury's Law
Canterbury's Law is an American legal drama television series, which aired from March 10 to April 18, 2008 as a mid-season replacement on Fox.
 The show was created by Dave Erickson and executive produced by Denis Leary, Jim Serpico, Walon Green, John Kane, and Mike Figgis, who also directed the pilot.
 The series revolved around Elizabeth Canterbury (portrayed by Julianna Margulies), a rebellious defense attorney willing to bend the law if it protects the wrongfully accused.
 A rising star, she puts her career on the line to take on risky and unpopular cases, even when they take a toll on her personal life.
Evelyn (film)
Evelyn is a 2002 drama film, loosely based on the true story of Desmond Doyle and his fight in the Irish courts (December 1955) to be reunited with his children.
 The film stars Sophie Vavasseur in the title role, Pierce Brosnan as her father and Aidan Quinn, Julianna Margulies, Stephen Rea and Alan Bates as supporters to Doyle's case.
 The film had a limited release in the United States, starting on December 13, 2002 and was later followed by the United Kingdom release on March 21, 2003.
Julianna Margulies
Julianna Margulies ( ; ('Mar-ga-lease') born June 8, 1966) is an American actress and producer.
 After several small television roles, Margulies achieved wide recognition for her role as Carol Hathaway on NBC's long-running medical drama "ER", for which she won an Emmy Award.
 She also voiced Neera in "Dinosaur" (2000) and appeared in the miniseries "The Mists of Avalon" (2001).
 In 2009, she took on the lead role of Alicia Florrick in the American legal drama "The Good Wife" on CBS.
 Her performance on that show has garnered acclaim: she won the Primetime Emmy Award for Outstanding Lead Actress in a Drama Series twice, a Golden Globe, and a Television Critics Association Award.
The Grid (miniseries)
The Grid is a 2004 television miniseries co-produced by the BBC, Fox TV Studios and Carnival Films.
 It starred Dylan McDermott and Julianna Margulies.
 It aired on TNT in the US and on BBC Two in the UK over three consecutive nights and is available on DVD in the UK, United States and Australia.
 It also aired on Seven HD in Australia in 2007.
Carol Hathaway
Nurse Carol Hathaway Ross is a fictional character on the popular television show "ER", portrayed by Julianna Margulies from 1994 to 2000.
 Julianna Margulies' removal from the main cast opening credits was in the final episode of season 6.
Bang (The Good Wife)
"Bang" is the fifteenth episode of the first season of the American legal drama television series "The Good Wife".
 It aired on CBS in the United States on March 2, 2010.
 In the episode, ex States Attorney Peter Florrick (Chris Noth) is released from prison to his home.
 He is confined by house arrest and starts working on restarting his legal career.
 His wife Alicia Florrick (Julianna Margulies) has conflicted emotions about his return and distracts herself with a legal case, in which she defends a man of killing a mutual fund manager who assisted in Bernard Madoff's investment scandal.
Alicia Florrick
Alicia Florrick (née Cavanaugh) is the lead character of CBS television series "The Good Wife" and is portrayed by Julianna Margulies, who has received positive reviews for her performance, winning two Primetime Emmy Awards for Outstanding Lead Actress in a Drama Series.
List of The Good Wife episodes
The Good Wife is a legal drama television series created by Robert King and Michelle King, which premiered on CBS on September 22, 2009.
 The show tells the story of Alicia Florrick (Julianna Margulies), whose husband Peter (Chris Noth) has been jailed following a very public sex and corruption scandal.
 She returns to her old job as a defense attorney under Will Gardner and Diane Lockhart (Josh Charles and Christine Baranski) to rebuild her reputation and provide for her two children, Grace and Zach (Makenzie Vega and Graham Phillips).

Answer: 331 episodes