I'm almost 9 weeks pregnant, but have spent most of that time worrying in the background about losing the baby (don't we all?)

I've read enough to understand roughly how common miscarriages are, and what they would feel like, but what I'm worried about is how common is it for the baby to die and then not exit the body? I don't have my first scan until 12 weeks and I'm so scared that there won't be a heartbeat.

Does anyone know how common this is?