custom_query_counter in flask_common.utils