added function to list all orders and count orders