The 40 unit squares of the 9 9-table (see below) are labeled. The horizontal or vertical row of 9 unit squares is good if it has more labeled unit squares than unlabeled ones. How many good (horizontal and vertical) rows totally could have the table?
1. **Understanding the Problem:**
   - We have a \(9 \times 9\) table, which contains 81 unit squares.
   - 40 of these unit squares are labeled.
   - A row (horizontal or vertical) is considered "good" if it has more labeled unit squares than unlabeled ones. This means a row must have at least 5 labeled unit squares to be considered good.

2. **Counting the Total Number of Labeled Squares:**
   - There are 40 labeled unit squares in total.

3. **Assuming the Maximum Number of Good Rows:**
   - Let's assume there are 17 good rows. Each good row must have at least 5 labeled squares.
   - Therefore, the minimum number of labeled squares in these 17 good rows is:
     \[
     17 \times 5 = 85
     \]
   - However, this is a contradiction because we only have 40 labeled squares available.

4. **Finding the Maximum Number of Good Rows:**
   - Since 17 good rows lead to a contradiction, we need to find the maximum number of good rows that do not exceed the total number of labeled squares.
   - Let's consider 16 good rows. Each good row must have at least 5 labeled squares.
   - Therefore, the minimum number of labeled squares in these 16 good rows is:
     \[
     16 \times 5 = 80
     \]
   - This is still a contradiction because we only have 40 labeled squares available.

5. **Reevaluating the Calculation:**
   - Let's consider 8 good rows. Each good row must have at least 5 labeled squares.
   - Therefore, the minimum number of labeled squares in these 8 good rows is:
     \[
     8 \times 5 = 40
     \]
   - This is possible because we have exactly 40 labeled squares available.

6. **Conclusion:**
   - The maximum number of good rows (horizontal and vertical) that the table could have is 8.

The final answer is \(\boxed{8}\).