Mostly vehicles are detected on roadways by what is know as a "road-loop". This is a loop of wire placed in the pavement to act as a large inductive coil. When a vehicle passes over it, changes in inductance due to the large mass of ferrous metal of the vehicle, are sensed by amplifiers/oscillator circuits connected to the loop.
If you are counting cars entering a parking lot, this is fairly straight forward, but if you need to do this on every single parking spot, it would be cumbersome.
You have probably seen this on public roads, it is commonly used at intersections to trigger an advanced turn light in the traffic signals. The give away is the tar filled saw cuts about the size of a vehicle in the roadway near the intersection.
Do a google search for " road loop " for examples.