import cv2.cv as cv
stream = cv2.VideoCapture(filename)
print(stream.get(cv.CV_CAP_PROP_FRAME_COUNT))
stream = cv.CaptureFromFile(filename)
no access to GetCaptureProperty or any similar function in python opencv