Fix counting chained queries
ocd