We look at the division of 640118 by 9 
The aim is to understand the frequency of 9 in 640118.

Going ahead to step 1:
6 divided by 9 is 0 with a remainder of 6.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 6 after subtracting 0 from 6.
Include the next digit (4) from the dividend after 6, then repeat: 64 / 9

On to step 2:
When dividing 64 by 9, we get 7 with a remainder of 1.
The number 7 becomes the next digit in our result. 
Result so far: 7.0
Subtract 63 from 64 to get 1.
Fetch the next digit (0) from the dividend, attach it to 1 and continue: 10 / 9

Let's proceed to step 3:
9 goes into 10 1 times with a remainder of 1.
The number 1 becomes the next digit in our result. 
Result so far: 71.0
Subtracting 9 from 10 leaves us with 1.
Fetch the next digit (1) from the dividend, attach it to 1 and continue: 11 / 9

Step 4:
When dividing 11 by 9, we get 1 with a remainder of 2.
Record the quotient 1 as the next digit in the result. 
Result so far: 711.0
If we subtract 9 from 11, we get 2.
Include the next digit (1) from the dividend after 2, then repeat: 21 / 9

Going ahead to step 5:
The number 9 fits into 21 2 times, leaving a remainder of 3.
Use 2 as the next digit of our solution. 
Result so far: 7112.0
Subtracting 18 from 21 leaves us with 3.
Include the next digit (8) from the dividend after 3, then repeat: 38 / 9

Let's proceed to step 6:
If we divide 38 by 9, we get 4 and a remainder of 2.
Put 4 as the next digit of the answer. 
Result so far: 71124.0
Deduct 36 from 38 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Let's proceed to step 7:
The number 9 fits into 20 2 times, leaving a remainder of 2.
The next digit of our result is 2. 
Result so far: 71124.2
Deduct 18 from 20 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 8:
If we divide 20 by 9, we get 2 and a remainder of 2.
The number 2 becomes the next digit in our result. 
Result so far: 71124.22
Deduct 18 from 20 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

The quotient of the division is 71124.22, and the remainder is 0.002.