To determine how many cable cars will be filled with 51 people, we divide the total number of people by the capacity of each cable car.
The capacity of each cable car is 6 riders.
Therefore, we calculate:
\[ \text{Number of cable cars} = \frac{\text{Total number of people}}{\text{Capacity of each cable car}} = \frac{51}{6} \]
Calculating this gives:
\[ 51 \div 6 = 8.5 \]
Since we can't have half a cable car, we round up to the next whole number because the half-filled cable car still requires an additional cable car for the remaining riders.
Thus, the number of cable cars needed is 9.
So, the answer is 9.