How many types of marines are there warhammer?

Well, Space Marines and Chaos Marines are the main ones.

Space Marines get different types, by their specialty. Assault Marines specialize in hand to hand combat. Devastator Marines specialize in heavy weapons, etc.