You must pay for each class of goods and/or services in the application. The "class" refers to the "international" class number assigned to the goods/services. Note: The number of "U.S." classes is irrelevant, except for some old U.S. registrations. And while an international class number is used, this is only for the purpose of world-wide consistency; i.e., through the USPTO, you will receive, if approved, a registration covering all 50 states and the U.S. territories, not some sort of international protection.
Example: If the application is for one mark (which is, in fact, all that is permitted in an application) but the mark is used for goods in two different classes, such as computer software in Class 9 and t-shirts in Class 25, then a filing fee for two classes is required before the application could be approved. Again, this is based on the total number of different classes in the application, not the number of goods and/or services within one specific class; e.g., an application listing for the identification of goods "pants, shirts, shoes, jackets, hats," although five separate items, would require a fee covering only one class, since all of these items fall within Class 25.
Note: The electronic application for an initial filing will automatically calculate the total fee amount due and display this information within the "Fee Information" section, prior to payment.