title: Query Realm for all objects based on the size of a RLMArray property?
body: <p>We're trying to write a Realm query to retrieve all objects where the size of a RLMArray property is a certain number. The Realm model looks like this:</p>
  
  <pre><code>class Foo: RLMObject {
      dynamic var people = RLMArray(objectClassName: User.className())
  }
  </code></pre>
  
  <p>And multiple iterations of the query we've tried without success are as follows:</p>
  
  <pre><code>// 'Invalid predicate expressions', reason: 'Predicate expressions must compare a keypath and another keypath or a constant value'
  let results = Foo.objectsWhere("people[SIZE] = %d", 2)
  
  // 'Invalid predicate', reason: 'RLMArray predicates must contain the ANY modifier'
  let results = Foo.objectsWhere("people.@count = %d", 2)
  
  // 'Invalid column name', reason: 'Column name @count not found in table'
  let results = Foo.objectsWhere("ANY people.@count = %d", 2)
  </code></pre>
  
  <p>We've looked through multiple examples, Apple's docs on NSPredicate &amp; other SO answers, and we can't seem to find an answer. How do we query for all objects based on the size of a RLMArray property?</p>