Detection, Tracking, and Counting the number of vehicles is the main foundation of intelligent systems for monitoring vehicle traffic flow. This research is going to perform vehicle detection using background subtraction algorithm and morphology operation. The result of those methods categorized as candidate object. Contour detection applied to define the object from its candidate. Vehicle is determined using threshold area of contour properties. The detected vehicles is tracked using an adaptive distance similarity measurement. Then, vehicle will be counted using the counting line after its vehicles pass that line. The proposed method is tested in four datasets with different challenges such as differences in light, weather, camera vibration, and image blurring. The research obtains satisfactory results especially in noon and rainy dataset with the accuracy higher than 93% for vehicle detection, tracking, and counting. The proposed method is able to detect, perform tracking, and counting the number of vehicles in a real time for highway videos.