It looks like the problem is a bit more complicated. The issue isn't that the gates aren't being counted (they actually are!) it's that the brute force pathfinding (when they start tearing down walls, gates, terrain, etc) isn't technically considered "attacking a building", it's just "attacking whatever is in its path". So when they're in this mode, and attack the gate, they're actually not flagged for "attacking a building".
The problem is how the counter works, it detects all the mobs flagged as targeting a building, and these specific mobs are not they're just finding the shortest path into the village (via the gate).
Because of that, it'll require some re-thinking how the problem panel handles this, so I probably won't be able to get it done by next patch (28 Stable is due out on the 15th, and I have other fish to fry!). But I'll toss it on the bug pile for later.