Vehicle counting from a video
You can keep track of the last 10-15 frames and count the number of white pixel of these frames. You can differentiate if it is a vehicle or not, since the graph will be high for 10-15 frames you will be able to say that it is a vehicle otherwise it is noise. 

To count multiple cars in multiple side by side lanes you can check the pixels column wise, I mean vertically. For the time being you must be checking the pixels horizontally for white pixels.