The objective of this research is to estimate the number of moving objects that passes through a specific area without fully decoding the H.265/HEVC bitstreams. First, the foreground prediction blocks are extracted according to the motion vectors of the H.265/HEVC bitstreams. Next, these foreground prediction blocks are clustered into the Region of Interests (ROIs) which are the possible area position of moving objects in the current frame. Lastly, the state of moving objects are identified by matching moving objects and these ROIs. In order to estimate the number of moving objects which move toward a predefined direction, a tripwire is set to a detecting area. Any moving objects crossing the tripwire and satisfying the intrusion conditions are counted. With the proposed method, the number of moving objects can be directly estimated in the compressed domain video. This approach significantly increase the processing speed more than 400% at the cost of less than 0.02% accuracy degradation compared to the traditional pixel domain approach. The research results can be applied to traffic management, realtime analysis of surveillance application, and other related areas.