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

On to step 1:
4 divided by 9 is 0 with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Fetch the next digit (5) from the dividend, attach it to 4 and continue: 45 / 9

Moving on to step 2:
If we divide 45 by 9, we get 5 and a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 5.0
If we take 45 away from 45, we end up with 0.
Include the next digit (7) from the dividend after 0, then repeat: 7 / 9

Moving on to step 3:
When dividing 7 by 9, we get 0 with a remainder of 7.
Put 0 as the next digit of the answer. 
Result so far: 50.0
Subtracting 0 from 7 leaves us with 7.
Bring next digit (0) of the dividend behind the 7 and repeat the process: 70 / 9

Moving on to step 4:
If we divide 70 by 9, we get 7 and a remainder of 7.
Record the quotient 7 as the next digit in the result. 
Result so far: 507.0
Deduct 63 from 70 and we're left with 7.
Grab the next digit (4) from the dividend, add it to 7, then carry on: 74 / 9

Let's proceed to step 5:
74 divided by 9 is 8 with a remainder of 2.
Put 8 as the next digit of the answer. 
Result so far: 5078.0
If we take 72 away from 74, we end up 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.

Going ahead to step 6:
9 goes into 20 2 times with a remainder of 2.
Write down 2 as next digit of the result. 
Result so far: 5078.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.

Step 7:
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: 5078.22
If we take 18 away from 20, we end up 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.

Our division results in 5078.22 with a remaining 0.002.