We're dividing 877161 by 9 
The aim is to understand the frequency of 9 in 877161.

Step 1:
8 divided by 9 is 0 with a remainder of 8.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Grab the next digit (7) from the dividend, add it to 8, then carry on: 87 / 9

Let's proceed to step 2:
9 goes into 87 9 times with a remainder of 6.
Write down 9 as next digit of the result. 
Result so far: 9.0
If we take 81 away from 87, we end up with 6.
Include the next digit (7) from the dividend after 6, then repeat: 67 / 9

Moving on to step 3:
9 goes into 67 7 times with a remainder of 4.
Use 7 as the next digit of our solution. 
Result so far: 97.0
Subtracting 63 from 67 leaves us with 4.
Bring next digit (1) of the dividend behind the 4 and repeat the process: 41 / 9

Going ahead to step 4:
9 can be fit into 41 4 times, resulting in a remainder of 5.
The next digit of our result is 4. 
Result so far: 974.0
Deduct 36 from 41 and we're left with 5.
Bring next digit (6) of the dividend behind the 5 and repeat the process: 56 / 9

Advancing to step 5:
9 can be fit into 56 6 times, resulting in a remainder of 2.
Put 6 as the next digit of the answer. 
Result so far: 9746.0
Deduct 54 from 56 and we're left with 2.
Append the next digit (1) from the dividend to 2 and continue with: 21 / 9

On to step 6:
The number 9 fits into 21 2 times, leaving a remainder of 3.
Write down 2 as next digit of the result. 
Result so far: 97462.0
Subtracting 18 from 21 leaves us with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Going ahead to step 7:
9 goes into 30 3 times with a remainder of 3.
Record the quotient 3 as the next digit in the result. 
Result so far: 97462.3
Deduct 27 from 30 and we're left with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

On to step 8:
When dividing 30 by 9, we get 3 with a remainder of 3.
The next digit of our result is 3. 
Result so far: 97462.33
Deduct 27 from 30 and we're left with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

The final result is 97462.33 with a remainder of 0.003.