So the best thing to do when switching over from GraphQL to DQL is to first check the schema of your types. In this case what was substores in GQL is actually Store.substores in DQL (for bookkeeping purposes, for if you had a different type with the same field name but different field type it would case a clash in fields.
So once you’re done having a look at the DQL schema type running the following →
query {
getStores(func: type(Store)) {
count(Store.substores)
}
}
and you’ll get something as follows →
"data": {
"getStores": [
{
"count(Store.substores)": 0
},
{
"count(Store.substores)": 0
},
{
"count(Store.substores)": 2
}
]
}
have fun and keep exploring 