density based traffic control system

can someone assist me with this project.i need to complete this project using ir sensors but using these sensors how to find out the traffic density or the count of vehicles and implement the traffic signals accordingly.according to the sources on internet what i found out is that the green light glows for more time even if the no: cars is 1 or 10.Please help me out as soon as possible.

What have you tried so far? Do you have Arduino code you can post here for us to see what you have already done?

Have you picked out a specific IR sensor yet? Do you need help choosing a sensor? Do you need help interfacing that sensor to the Arduino?

did your professor offer more details or requirements ?

sensor placement quantity is important.

two sensors on the same path can show speed.
one car parked. broken down or reading signs might be a false trigger.

I would also suggest you go time a traffic light. often they are green for about 30 seconds, rarely more than 1 minute.

My peeve is over sensitivity on either direction. My commute has me pass one light on a State highway. this light is at a county road. the county road takes precidesnce if there is ANY traffic.

the State road goes red if there is a 3 second break. this often results in a line of 30 cars, light goes green and the first ones go through, then as the cars from the long queue start to move some move faster and there is a gap and the light changes with 20 more cars in line. then one or two cars pass then it goes back to the main road.
if the cross road were to wait 20 seconds, chances are more cars would line up and the vast majority of the main road cars would pass. very poor programming or program settings.

if they had a second sensor, one for speed of cars, they would be able to tell there is a long line