How to enable automatic number counter.

Hi all experts,
I am designing a program of telephone directory in C++, which will have database of all personal information entered by users. Now I want to have automatic number counter which will be displayed before showing final result like a waiting counter. Can anyone help me in coding for enabling a automatic number counter in my program.
