What is considered a miscarriage ?

I know what a miscarriage is, but I also found out about chemical pregnancy. Do you count that as a miscarriage too?