'How to make YOLOv3 only detect one object type?

Using YOLOv3 I want to count one specific object type (I'm trying to count cars only). It can detect more than 1 item (like car, person, can etc.), it can make "if label != 'car' :"passed.

How can I get only objects with 'car' in label (or is there any solution that rewrites "if label != 'car' :")? My code:

While cap.isOpened():  
    cls = int(x[-1])
    label = "{0}".format(classes[cls])
    if label == 'car' :
        buffer = True
    if label != 'car' :
        if buffer == True :
            find = True
    if find == True :
        car = car + 1
        buffer = False
        find = False


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source