Counting entering/exiting objects