The CommandList_NumCommands() function retrieves the number of commands in the specified command list.
CommandList_NumCommands(command_list_tag)
• command_list_tag – The integer tag value specifying the command list for which commands will be counted.
An integer containing the number of commands.