select count(*)
from ec_orders
where user_session_id=:user_session_id
and order_state='confirmed'
select order_id
from ec_orders
where user_session_id=:user_session_id
and order_state='in_basket'
select order_id
from ec_orders
where user_session_id=:user_session_id
and order_state='in_basket'