How hard can it be to count a few XML nodes?