If I get it right, the Ruler will only get money by taxing the Dukes. This would encourage having as many duchies as possible?
No. If the Ruler has 10 dukes, that means that 10 people will click the protest link when he raises the realm tax. If the ruler has 2 dukes, that means that only 2 people will click the protest link. (Yes, I know, the dukes could get those under them to protest...)
Let me provide an example:
Duchy1 200 gold Duke 160 gold Ruler 40 gold
Duchy2 200 gold Duke 160 gold Ruler 40 gold
Total 400 gold Dukes 320 gold Ruler 80 gold
Or, let's say the duchies get split in half:
Duchy1 100 gold Duke 80 gold Ruler 20 gold
Duchy2 100 gold Duke 80 gold Ruler 20 gold
Duchy3 100 gold Duke 80 gold Ruler 20 gold
Duchy4 100 gold Duke 80 gold Ruler 20 gold
Total 400 gold Dukes 320 gold Ruler 80 gold
See? It's the same either way. It all depends on the realm share and duchy share.