Getting the length of a list of records

Im trying to use frappe.db.get_list to get a list of a records. But when I use the len() function on it, it returns len() not defined. I want to get the length of list for a workflow condition.