For IndexCountScan, there needs to be an index covering the query and the query should only have COUNT(*) in its projection.
There is no separate enablement for this feature.
see: https://dzone.com/articles/a-deep-dive-into-couchbase-n1ql-query-optimization
Please try with the 5.0 Beta. https://www.couchbase.com/downloads
We’ll post the jira for improvements soon.