Not in the mood for sex.

This year I found out I was pregnant , loss the baby and now I just don't want to have sex like I did before. Is this normal and how long will I not want to have sex?