Dooku would only be able to kill Anakin if the latter somehow became distracted and the former accidentally killed him. Dooku wasn't making an effort to kill Anakin as he was Obi-wan. "Palpatine has told Dooku. 'I have somebody who I think will be a great Sith Lord and I think we can get him to join us. But we need to test him. So we're going to setup a situation where you fight him. If he gets the best of you, then I'll stop the fight and he'll have passed the test. If you get the best of him, then we'll let him go, and we'll let him stew for a few more years until he's ready.' But behind it, obviously, is Palpatine's real intention: If Anakin is good enough, Anakin can kill Dooku and become Palpatine's new apprentice. But he didn't tell Dooku that." --George Lucas, The Making Of ROTS; Page 41. The only way this doesn't happen accidentally is if Dooku decides to betray Palpatine and kill the boy.