This is an easy one. Try it out before you seek for the answer. To reveal the answer, click the following button:
The answer is 6. Since each one of them is related with only 9 children, this means that for each one there has to be 3 children that are not related to each other. So, Jim has 3 children from his previous marriage that Mary isn't related to, and Mary had 3 children from her previous marriage that Peter isn't related to.