Who's counting? "Unexpected," which premieres Sunday at Sundance as part of the U.S. Dramatic Competition, is technically Kris Swanberg's third feature film. Yet it is the first feature on which she has used such common elements of filmmaking as a script, a full crew or a producer.
Working for the first time as well with known actors, her new film's star, "How I Met Your Mother" and "Avengers" actress Cobie Smulders, was actually pregnant with her second child while taking on the role of a high school teacher dealing with her unplanned pregnancy.
"This definitely feels like my first feature," said Swanberg, reached by phone recently while putting the finishing touches on the film at Skywalker Ranch in Northern California, something she never would have done on her earlier improvised films, "It Was Great, But I Was Ready To Come Home" and "Empire Builder."
"I wasn't ever sure I was delivering the message I wanted to deliver," she said of her previous efforts. "Because the budgets were so small, if I found out I wasn't, that was sort of it. This story was really personal and really important to me and I just really wanted to get it right."
In the film Smulders plays Samantha, a teacher at a low-income high school who finds out she is pregnant. This puts pressure on her relationship with her boyfriend ("The Mindy Project's" Anders Holm) whether to get married and if she'll continue to work. When Samantha discovers that one of her students, Jasmine (Gail Bean, in a performance that should make her one of the discoveries of the festival), the two women form a friendship that pushes each of them to confront their own assumptions about who they each really are and what they really want.
The film is based on Swanberg's own experiences when she became pregnant while teaching high school in Chicago. Her husband, filmmaker Joe Swanberg, is also appearing at Sundance with his own film, "Digging For Fire," and they are the first husband-and-wife pair at the festival to have each directed their own film in the same year. (Their young son Jude also put in a scene-stealing performance last year in his father's "Happy Christmas.")
It's been a busy time for Smulders, who last year finished her role on the long-running sitcom "How I Met Your Mother," appears in another film in this year's Dramatic Competition, Andrew Bujalski's "Results," and also, as she put it, "shot a really, really small independent film called 'Avengers 2: Age of Ultron.'"
So shooting "Unexpected" last fall while pregnant could be seen as some combination of going method and multi-tasking.
"The timing of it was what it was. It wasn't planned to happen that way, but I think my pregnancy was beneficial to the movie in some respects," Smulders said. "At the same time it wasn't exactly matched up with the character. And it's an independent film, so in the morning I'm playing somebody three weeks' pregnant and in the afternoon I'm playing somebody who is eight months' pregnant."
"We were still casting when I found out she was pregnant. She had a leg up at that point," said Swanberg. "I called her and was like, 'Hey, are you sure you want to do this' and she said 'Absolutely.'
"For some reason I thought, 'Of course that's so perfect.' And I think that's what she thought too," added Swanberg.
The movie is also based in part on Swanberg's realization from movie-watching that she was being let down on two fronts, one in the depiction of teaching in low-income schools, which veer toward melodrama, and the other in portrayals of pregnancy, which veer toward comedy.
While also mentioning the 2009 John Krasinski/Maya Rudolph film "Away We Go," she discovered that one of the best portraits of pregnancy in a movie was John Hughes' 1988 film "She's Having A Baby." That film's female lead, Elizabeth McGovern, also appears in "Unexpected" as Smulders' mother.
"I tried to watch old movies about pregnancy and weirdly, considering that everyone is born, from a woman, there aren't that many," Swanberg said. "There's really only a handful of movies that deal with pregnancy. And hardly any that are sincere and really good. So I wanted to do that."
Working with Megan Mercier as co-writer, Swanberg took about two years to write the script, in part because she was often having to find time to work around caring for her son. Then when she met producer Andrea Roa at Sundance last year things started to move forward.
As Swanberg's new first film, "Unexpected" explores the experience of pregnancy as one of confusion and growth with honesty and warmth, where the only certainty is that things will most likely not go as planned.
"I really loved how it showed how these two women who were in the same situation but under different circumstances and how they dealt with it," said Smulders. "You can go into the movie expecting one thing and I think that a lot of times when you get pregnant you have all these assumptions.
"I feel this movie really twists that," Smulders said, "and you really get to see a whole other side of becoming a mother and bringing a child into the world and what you truly need to do."