A multitype stochastic population model