Pikes can certainly defend cannons against Knights, and cannons can definitely weaken city defenders enough that pikes are enough to finish them off, but that leaves your stack with two rather big vulnerabilities, namely Maces and Crossbows. I don't know how many of them AIs build and are willing to use offensively, especially when they don't have Horses to build Knights, but either way I think I'd take fewer Jens over more Pikes. Depending on the situation, of course.