We look at the division of 474116 by 40 
The aim is to understand the frequency of 40 in 474116.

Advancing to step 1:
When dividing 4 by 40, we get 0 with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 4 to get 4.
Bring next digit (7) of the dividend behind the 4 and repeat the process: 47 / 40

Going ahead to step 2:
If we divide 47 by 40, we get 1 and a remainder of 7.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we subtract 40 from 47, we get 7.
Append the next digit (4) from the dividend to 7 and continue with: 74 / 40

On to step 3:
40 goes into 74 1 times with a remainder of 34.
Write down 1 as next digit of the result. 
Result so far: 11.0
Subtract 40 from 74 to get 34.
Take the next digit (1) from the dividend and append it to 34, then repeat: 341 / 40

Moving on to step 4:
When dividing 341 by 40, we get 8 with a remainder of 21.
Use 8 as the next digit of our solution. 
Result so far: 118.0
If we take 320 away from 341, we end up with 21.
Bring next digit (1) of the dividend behind the 21 and repeat the process: 211 / 40

Step 5:
The number 40 fits into 211 5 times, leaving a remainder of 11.
Put 5 as the next digit of the answer. 
Result so far: 1185.0
Deduct 200 from 211 and we're left with 11.
Grab the next digit (6) from the dividend, add it to 11, then carry on: 116 / 40

On to step 6:
If we divide 116 by 40, we get 2 and a remainder of 36.
The number 2 becomes the next digit in our result. 
Result so far: 11852.0
If we subtract 80 from 116, we get 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

On to step 7:
The number 40 fits into 360 9 times, leaving a remainder of 0.
The number 9 becomes the next digit in our result. 
Result so far: 11852.9
If we take 360 away from 360, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

On to step 8:
40 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 11852.9
If we take 0 away from 0, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 9:
40 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 11852.9
If we take 0 away from 0, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The quotient of the division is 11852.9, and the remainder is 0.0.