How to find bucket size from N1Q1

There is now easy way to get this. You should use REST API of bucket stats (or cbstats https://docs.couchbase.com/server/6.6/cli/cbstats/cbstats-all.html, ep_kv_size, ep_value_size) and get from there.
If really need N1QL same REST call can be used with N1QL CURL() function described here.

This post talks some thing hard way to get but it can take long time. Get the size of documents returned by a query, *including* attachments