From casual reading, it seems as though many C64 titles were ported from the ZX Spectrum.
Why was this the case? Was the ZX Spectrum more popular? Or easier to develop for?
First, the title question: which had more games?
The lists are not exhaustive, and they only include games. It makes a lot of sense that the C64 would have many more titles, though. It was a system popular all around the world, while the ZX Spectrum was primarily a UK system.
As far as porting games from the Spectrum to the C64, software developers would have a financial incentive to have the biggest market possible for their games. The Spectrum developers would have significant desire to reach a worldwide audience, while, say, American C64 developers would have a smaller incentive in expanding to an audience largely limited to the UK. This is especially true since the C64 was already one of the two most popular systems in the UK. I.e., they already had a large number of potential customers there.
I don't know which was easier to develop for. I suspect the number of development tools and and amount of documentation and shared techniques was larger for the C64, though -- again due to its worldwide presence.
Depending on how far you want to stretch the meaning of the word "titles" in the question, it might be worth noting that the number of C-64 demoscene productions far exceeds those for the Spectrum (and - I think - every other platform). The vast majority of those will be original and exclusive to their respective platforms, I'd guess, although a non-trivial amount - quite possibly the majority - would have been created after those platforms' 1980s heydays.
Obviously the demoscene is a subculture, and popularity there doesn't necessarily reflect the wider world - I certainly wouldn't care to use those stats to claim the C-64 was more popular than DOS or Windows!
Rather, I think it helps support the point already made about the C64 having a more international following than the Spectrum, given that the demoscene is/was more known/popular in mainland European countries than English-speaking ones. NB: I'm not sure how much software was produced for Spectrum clones in eastern Europe, perhaps that might impact any figures/analysis?
(Anecdotally, the Speccy was the most popular computer from about a dozen types amongst the kids at my 1980s secondary school in northern England, whereas our compatriots at a twinned school in Germany were 100% Commodore users.)