updated counter.c and created .gitignore file