Counting button pressed on remote controle

Hi,

here is a related thread from last week from a user that is also using a Rasberry Pi in their application where a button is used to select between different menu options.