How to set integer number of chain and how mate chain with sprocket ?

Hello My friends;

please need your support to solve my two issues

1- how to set integer number of chains with changing distance between two axis of sprocket ?

2- how to mate edge of sprocket with chain ?

please find parts with assembly that I tried

Best Regards

SolidworksAssemblies