{"action":"created","issue":{"url":"https://api.github.com/repos/OData/WebApi/issues/194","labels_url":"https://api.github.com/repos/OData/WebApi/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/OData/WebApi/issues/194/comments","events_url":"https://api.github.com/repos/OData/WebApi/issues/194/events","html_url":"https://github.com/OData/WebApi/issues/194","id":54971025,"number":194,"title":"Count with filter doesn't work in ODATA queries","user":{"login":"LianwMS","id":9375712,"avatar_url":"https://avatars.githubusercontent.com/u/9375712?v=3","gravatar_id":"","url":"https://api.github.com/users/LianwMS","html_url":"https://github.com/LianwMS","followers_url":"https://api.github.com/users/LianwMS/followers","following_url":"https://api.github.com/users/LianwMS/following{/other_user}","gists_url":"https://api.github.com/users/LianwMS/gists{/gist_id}","starred_url":"https://api.github.com/users/LianwMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LianwMS/subscriptions","organizations_url":"https://api.github.com/users/LianwMS/orgs","repos_url":"https://api.github.com/users/LianwMS/repos","events_url":"https://api.github.com/users/LianwMS/events{/privacy}","received_events_url":"https://api.github.com/users/LianwMS/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OData/WebApi/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/OData/WebApi/labels/Import%20From%20CodePlex","name":"Import From CodePlex","color":"000000"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-21T02:50:18Z","updated_at":"2015-07-17T18:15:44Z","closed_at":null,"body":"According to ODATA v4 Spec Protocol Part \r\n\r\nSection 11.2.5.1 System Query Option $filter\r\n\r\nhttp://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398301 \r\n\r\nThe following query is supported in ODATA\r\n\r\nhttp://host/service/Categories?$filter=Products/$count lt 10\r\n\r\nHowever when I try this against a Web API 2.2 with OData4, I am getting the following error:\r\n\r\n>\"code\":\"\",\"message\":\"The query specified in the URI is not valid. The parent value for a property access of a property '$count' is not a single value. Property access can only be applied to a single value.\",\"innererror\":{ \"message\":\"The parent value for a property access of a property '$count' is not a single value. Property access can only be applied to a single value.\",\"type\":\"Microsoft.OData.Core.ODataException\",\"stacktrace\":\"   at Microsoft.OData.Core.UriParser.Parsers.EndPathBinder.BindEndPath....\r\n\r\nIs this the expected behavior?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/OData/WebApi/issues/comments/122363258","html_url":"https://github.com/OData/WebApi/issues/194#issuecomment-122363258","issue_url":"https://api.github.com/repos/OData/WebApi/issues/194","id":122363258,"user":{"login":"fazzamar","id":1259600,"avatar_url":"https://avatars.githubusercontent.com/u/1259600?v=3","gravatar_id":"","url":"https://api.github.com/users/fazzamar","html_url":"https://github.com/fazzamar","followers_url":"https://api.github.com/users/fazzamar/followers","following_url":"https://api.github.com/users/fazzamar/following{/other_user}","gists_url":"https://api.github.com/users/fazzamar/gists{/gist_id}","starred_url":"https://api.github.com/users/fazzamar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fazzamar/subscriptions","organizations_url":"https://api.github.com/users/fazzamar/orgs","repos_url":"https://api.github.com/users/fazzamar/repos","events_url":"https://api.github.com/users/fazzamar/events{/privacy}","received_events_url":"https://api.github.com/users/fazzamar/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T18:15:44Z","updated_at":"2015-07-17T18:15:44Z","body":"According to the OData 4 standard this should work (http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398087).\r\nAny word on this?"}}