period after a loss

weird question. but when you’re pregnant and have a miscarriage, does that bleeding count as your period ? will you not get a period till the next month ? like i’m kinda confused of how to know when i’m fertile again.