How to drive Arduino UNO as a counter triggered by 555 timer's output (astable mode)
You need to create a finite state machine with 2 states:


Waiting for input from 555 to go high.  When this happens increment the counter &amp; advance to the next state.
Waiting for the input from the 555 to go low.  When this happens advance to the next state.  That is, the first state.


In the following Arduino "State Change Detection (Edge Detection) for pushbuttons" example / tutorial you do not need the complex code to debounce the switch.  However, the edge detection and state machine portion of the code can likely be applied to your project.