How to make a counter incoming\outgoing on two sensors?

please read this post on how to share your flow