I don't play vanilla any more but a general answer on counters to cannons is; (1) Attack where they aren't. That is, avoid the cannons and attack elsewhere if that is possible. (2) Use cannons to kill cannons. A good old-fashioned cannon duel can be fun but don't get too fixated on it. Remember to watch the rest of the map. (3) Cavalry are good (especially hussars) to capture undefended cannon and spike (delete) them. (4) Units with heavy protection against cannons are good. Check out the unit statistics. (Personal protection armor against cannons does not exist in real life but hey it's just a game!)