Dooku definitely knew that Palpatine was Sidious.
He stated so to Obi-Wan when interrogating him at Geonosis.
OBI-WAN: The truth?
COUNT DOOKU: The truth. What if I told you that the Republic was now under the control of the Dark Lords of the Sith?
OBI-WAN: No, that's not possible. The Jedi would be aware of it.
COUNT DOOKU: The dark side of the Force has clouded their vision, my friend.
Hundreds of Senators are now under the influence of a Sith Lord called Darth Sidious.
This is further confirmed directly in the Revenge of the Sith(ROTS) novelization by Matthew Stover, when it clearly shows (as a surprise to a reader) that Dooku's Master, Darth Sidious, is none other than Supreme Chancellor of the Republic, Palpatine:
(at the end of long conversation between Dooku and Palpatine about the impending fate of Kenobi and Skywalker as they progress through Grevious's ship to rescue the Chancellor):
Dooku straightened and for the first time looked his Master in the eyes.
Darth Sidious, Dark Lord of the Sith, sat in the General's
Chair, shackled to it at the wrist and ankle.
Dooku bowed to him. "Thank you, Chancellor."
Palpatine of Naboo, Supreme Chancellor of the Republic, replied, "Withdraw. They are here."
The reason Dooku didn't reveal that when Skywalker fought him because Sidious promised that he would survive (duh!). The high-level plan (told to him by Sidious) would be that he, Dooku, would be "captured" by Skywalker, and then would "discover" the true extent of Confederacy's crimes... and be cleanly separated from it when Palpatine crushes CIS.
"It will be," he said slowly, meditatively, as though he spoke
only to himself, "an embarrassment to be captured by him." [discussing Anakin]
"It is... fatiguing, to play the villain for so long, Master. I find myself looking forward to an honorable captivity." (src: same ROTS novelization... this statement was followed by exposition of what the post-capture plans were).
For the first time since Sidious had revealed the
true subtlety of this masterpiece, Dooku allowed himself to
relax enough to imagine the outcome.
With his heroic capture of Count Dooku, Anakin Skywalker will
become the ultimate hero: the greatest hero in the history of he
Republic, perhaps of the Jedi Order itself.
After Sidious ordered Anakin to kill him, Dooku was too shocked by the betrayal and exhausted by the fight to say anything to Anakin (and nobody else was around to hear - Obi-Wan was unconscious at the time).
The book explains Dooku's realization, shock and surprise, and thoughts, but it is ~2 pages long, so I won't quote.