"Always two there are.... a master and an apprentice."
The Rule of Two was instituted by Darth Bane a thousand years ago, but AFTER the Jedi believed that all of the Sith were destroyed.
So.... unless he has been keeping a secret from the entire Jedi order, how does Yoda know this?!