Task: Text to Code
Input (English): Step 1: For each row in Ref_Payment_Methods table, find the corresponding rows in Invoices table.
Step 2: find the number of different Invoices's payment_method_code in the results of step 1 whose payment_method_description equals credit
Output (English): SELECT Count ( DISTINCT T2.payment_method_code ) FROM Ref_Payment_Methods AS T1 JOIN Invoices AS T2 ON T1.payment_method_code = T2.payment_method_code WHERE T1.payment_method_description = "credit"