We will try to help you but not do the actual programming. Please post any effort you have made and we will try to guide you in the right direction. Is this the only details you have? If so , please define your methods of input and output. Are you limited on the number of counters? Without any guidelines, I would suggest you become familiar with how the "P" and the "C" relays work.