def count(self, dt, filters=None, debug=False):
		if filters:
			conditions, filters = self.build_conditions(filters)
			return frappe.db.sql("""select count(*)
				from `tab%s` where %s""" % (dt, conditions), filters, debug=debug)[0][0]
		else:
			return frappe.db.sql("""select count(*)
				from `tab%s`""" % (dt,))[0][0]
Brute force: O(n*n*k)
dataset/ETHPy150Open frappe/frappe/frappe/database.py/Database.count--crossover with--dataset/ETHPy150Open algorhythms/LeetCode/318 Maximum Product of Word Lengths.py/Solution.maxProduct