Added len() operator support for query chain