Amusingly, it increasingly seems as though Star Wars simply can't decide whether Count Dooku knew about Order 66. In canon, the clone army was commissioned by Jedi Master Sifo-Dyas, a Jedi who possessed a unique predilection toward visions of the future. The Jedi Council generally distrusted these visions, with Yoda considering any attempt to prepare for a glimpsed future to be of the dark side; Jedi are supposed to obey the will of the Force, not try to control it, he argued. Sifo-Dyas disagreed, sensing the coming of the Clone Wars, and he commissioned the clone army to give the Jedi a chance to survive the coming darkness.
There is a tragic irony in the fact Sifo-Dyas’ plan to save the Jedi became the very tools the Sith used to destroy them. Palpatine had already seduced Sifo-Dyas’ good friend Count Dooku to the dark side, and Dooku engineered Sifo-Dyas’ death, before subverting the entire clone program. Inhibitor chips were installed in the clones that would allow the Sith to turn them into mindless killers when Palpatine issued Order 66. But the interesting question is whether Dooku knew what he was doing.