The bidirectional counter using micro-controller 8051. Using the IR sensors, a counter that can change its state in either direction, upwards or downwards; It can be used to count number of persons entering hall in the up mode at entrance gate. In down mode, it can count back down the number of persons leaving the hall at exit. It can be used to count the number of people at various places. A very useful project in security purposes for public counting.