API:GetStoreSellItems

Returns how many Items the Merchant sell. (When the frame is opened) GetStoreSellItems

Returns
a Number

Example
Open a merchant frame and press the macro with /script DEFAULT_CHAT_FRAME:AddMessage(GetStoreSellItems)