How many orders are selected with OrderSelect(SELECT_BY_POS ,MODE_HISTORY)?

 
all orders with that account, or just what appears in the account history tab?
 

See Documentation for function OrdersHistoryTotal():

Returns the number of closed orders in the account history loaded into the terminal. The history list size depends on the current settings of the "Account history" tab of the terminal.

 

OrderSelect() selects one order