Moreover I want to add that my idea is to use two couples of sensors, (perhaps IR emmiter/receiver is a very good solution, as StathisCy also said) and put both of the couples at the door with some distance between them. In such a way you can also check if somebody is coming in or out..e.g. when couple #1 gives signal first and #2 afterwards, that means that somebody is coming in and when couple#2 gives signal first, that means that somebody is coming out! I have made something like that in the past, but only checked it with some switches instead of the sensors... If you want some help with what IC to use and in general about the hardware you can ask further! Just to give you an idea, I had first designed the appropriate ASM diagram and according to that easily found what and which ICs to use. For counting I had used synchronous up/down BCD counters (SN74LS190) and to display the number of people, some 7-segment displayers (SA52-11HWA) with BCD-to-7 segment decoders (DM74LS47), so as to connect them directly to the counter`s outputs. And of course some flip-flops are needed too. I hope I have helped you...