I have defined a Parse core object of type X that has a pointer to another object of type Y as one of its attributes. There are about 1000 of type X objects defined and about 20 of type Y objects.
I need to create a JavaScript query that would start with object ID for a type Y object and get count of type X objects that contain pointer to a type Y object with this object ID.
This would be a very easy query against a traditional SQL-based back-end, but in Parse I can't find a solution.