Added a function to extract bindings counts from a query result.