The help article actually specifies how you can mod your query in order for it to work:
Tasks.Where(SubTasks.Count > 2)
SubTasks is a collection that is part of every Task. The query you see is the same as:
item => item.Tasks.Where(param0 => param0.SubTasks.Count > 2)
As to the custom nature of your query, you will probably have to experiment a bit in order to get the exact syntax you need.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.