This paper implements a real-time and directional counting algorithm using the Graphic Processing Unit (GPU) Programming for the purpose of detecting and counting people. We use the Compute Unified Device Architecture (CUDA) as the environment of the GPU programming. The proposed algorithm is implemented for detecting and counting people employing the single virtual line and two virtual lines, respectively, using three video streams and two GPU graphic cards GeForce GT 630 and GeForce GTX 550Ti. We first test the video streams on the algorithm by using GeForce GT 630 together with applying the single virtual line and two virtual lines, respectively. Then, we repeat the same procedures for the GPU graphic card GeForce GTX 550Ti. The obtained experimental results show that our proposed algorithm running on GPU can be successfully programmed and implemented for people detecting and counting problems. (C) 2017 Elsevier B.V. All rights reserved.