In this paper we propose a method for the automatic counting of pedestrians in video sequences for (automatic) video surveillance applications. We analyse the trajectory data set provided by a detection/tracking system. When using classical target detection and tracking systems, it is well known that the number of detected targets is overestimated/ underestimated. A better representation for the trajectories is given in the ICA (Independent Component Analysis) transformed domain and clustering techniques are applied to the ICA-transformed data in order to provide a better estimation of the actual number of pedestrians which are present on the scene.