How to Count Rows in a Separate Table Using a Foreign Key
A join of some type between the two tables is needed - and then group by customers.customer_id. Then to get results for customers with no orders, one way would be to use a LEFT join:

SELECT 
    C.CUSTOMER_ID, 
    COUNT(O.ORDER_ID) AS TotalOrders
FROM 
        CUSTOMERS  C 
    LEFT JOIN 
        ORDERINFO  O
    ON 
        O.CUSTOMER_ID = C.CUSTOMER_ID
GROUP BY 
    C.CUSTOMER_ID ;