How to untangle the overlapping c elegan image and count the number of them?

It is the binary segmentation image of bbbc10 c elegan.how to untangle the overlapping c elegan in it?and then,I need to count the number of c elegan.Could you code it by matlab or python?
this is the bbbc10 https://bbbc.broadinstitute.org/BBBC010

Have you tried the UntangleWorms module?

I do not know how to use it

You might find this page helpful. The pipelines were originally for CellProfiler 2, but it should be possible to do something similar in modern versions.