sp_filt_mkII: measure connected components

Add code to measure connected components in shape.