Fix issue with ODataQueryExpand and the use of count variable overriding itself.