The State's Attorney of each county shall prosecute all violators of this Code. They shall receive as fees the sum of $20 in counties with less than 3,000,000 inhabitants and $40 in counties with 3,000,000 or more inhabitants for each conviction, to be taxed as costs, and 10% of all fines collected. The residue of all fines collected under this Code shall be paid into the county treasury for use of the county.
35 ILCS 200/25-45