Make a count of token

Hello everybody =).

I’m French so I’m sorry if I will make some fault :blush: .

I’m IT student and I must to create a signal count for Linux.
I’m working on an automaton and I can insert token in this automaton.
I want to count the number of token and make a program on my computer which launch when the number of token is 100 (for example).

I already have a sensor and a meter. But I don’t know : how to fetch the meter’s information and use it to launch my application.

Do you know what hardware I must to buy ?

Thanks you and I’m waiting your response =)

Sorry, not likely that you will get many responses.
Please supply more details of what exactly you would like to do.
If necessary, you can post in french.