First, lets look at what is involved in using extra cores:
First and formost is how many threads a program runs; the more threads, the more theoretical CPU cores can be used at one time. Next is the (Crappy in my mind) windows scheduler, whos job is to put threads on the core that will allow the fastest execution time for the entire SYSTEM. Next is how well threaded each individual thread is [IE: Not sharing resources, etc] that makes it easier for threads to be offloaded to cores.
So you see, getting extra threads to extra CPU cores is not an easy task. [Threading itself is simple though; I've written programs that use dozens of threads, and every program should at least use two threads to seperate the GUI from the actual processing...]. As such, faster chips with fewer cores will frequently be faster. Hence, a faster X4 could beat a slower X6.
Next up, you need to factor in different architecture changes, which typically results in certain CPU instructions being faster, so newer versions of chips tend to be slightly faster, all else being equal.
Finally, different software preferrs different CPU architectures; Some programs just run faster on certain chips, due to the way they are designed.