Low cost real-time depth cameras offer new sensors for a wide field of applications apart from the gaming world. Other active research scenarios as for example surveillance, can take advantage of the capabilities offered by this kind of sensors that integrate depth and visual information.In this paper, we present a system that operates in a novel application context for these devices, in troublesome scenarios where illumination conditions can suffer sudden changes. We focus on the people counting problem with re-identification and trajectory analysis.Automatic people counting offers different application contexts related to security, safety, energy saving or fraud control. Here we go one step further and give hints to extract useful information using depth cameras. The processing of that information allows us to analyze the individuals behavior, particularly if they go away from the typical trajectory, and the problem of re-identifying people.