When Shamari Cooke was pregnant with her daughter, her OBGYN recommended that the first-time mom use an app called Count the Kicks. What Cooke didn't expect was for the app to have a hand in saving her baby's life.

Count the Kicks is an app created for an evidence-based campaign that teaches expectant parents about the importance of tracking fetal movements. Cooke began using the app daily during the third trimester to become familiar with her baby's movements.

“As a first-time mom, I didn’t know that I was supposed to even count her kicks. I just assumed that they just move all the time,” said Cooke.

Every night during Cooke’s third trimester, she tracked her baby’s movements with the app, but during one July evening she noticed something felt wrong.

“The last time she had kicked was after I got off work at 5," Cooke tells WSFA News. “So when I got home, me and my husband - we went walking, ate and I laid down. I realized I hadn’t felt her since I got off work and so I drank ice water. Usually, that would get her to start moving, but I drank some ice water and she still didn’t move.”

Related: Is your baby kicking up a storm? Research explains the reason fetuses move so much

As the evening went on, she and her husband grew worried and decided to go to the emergency room.

"To be honest, I really did not want to go and spend the night in the ER and have an additional hospital bill, but we knew this could be important to our baby’s safety," Cooke says in an Instagram post on the Count the Kicks account.

When Cooke and her husband arrived at the hospital, her daughter still had a heartbeat. A non-stress test showed that Cooke's amniotic fluid had become very low, despite the fact that she had suffered no symptoms or leakage. Her levels remained too low even after medical intervention, so she was induced.

“It was crazy because the hospital is only 15 minutes away from our house,” Cooke said. “Those were the longest 15 minutes in my life because I kept trying to talk to my stomach like, ‘Come on, Aspen. Come on, Aspen. ‘Move, move, move.’”

Cooke ended up enduring an emergency C-section, and delivered a healthy baby girl named Aspen.

“I’m just grateful," Cooke tells WSFA. “Because what if I didn’t go to the hospital?”

Related: This new finding about why babies move so much in the womb is fascinating

Jasmine Hammonds, ambassador for Count the Kicks, tells WSFA that in Alabama, one out of every 113 pregnancies ends in stillbirth. Using an app like Count the Kicks could potentially lower those rates by 32%, Hammonds says.

“I’m just thankful that we caught it in time,” said Cooke.

The Count the Kicks app is free. To learn more about the campaign, click here.