[BUGFIX] Fix usage of non existing field in count query