Use len() instead of Query.count()