Fwiw,
California's new toll expressways do this - counts people in the car at speed, and charges different rates based on that - so the technology already exists.
Edit: Apparently the highway patrol is notified of carpools they should watch in passing.