Sitecore query is based on XPATH, but looks like it does not support count() function. My query is this:
../*[@@templatekey='topic' and count(child::*) > 0]
But gives me "Object reference not set to an instance of an object." error. But if I remove the count() filter, works just fine...
Any idea why it doesn't like count?