running jobs counter in pthread implementation