Cores and frequencies sound good on paper, but there's a whole other number of factors that are involved. When it comes down to it, Intel CPUs have far better core architecture, and an i5-4670k will outperform an FX-8350 most of the time across the board, and especially for gaming. aznricepuff said it nicely, the i5-4670k is the better choice and the FX-8350 doesn't truly have 8 cores.
To be fair, the FX-8350 can get close to an i5-4670k for some games, which is great. However, for other games there can be quite a large disparity between the two CPUs, and most importantly, my main gripe with AMD CPUs is that there are a good number of games out there which has great average frame rates and then some pretty bad minimums which kills immersion for me. I just say that the safer bet is an i5-4670k. It's far more future proof and the extra $40 will be worth it.