Nc=(N6 - N6N7N0) + Σ (Nk - Nk NkNk + 1 + 2) k ∈ S
Here S={0, 2, 4},
When the Pk p 1, Nk=0, otherwise the Nk=1,

The pixels to calculate the number of connections is 2, but seems like a separate connection number is 3 ah, excuse me, how to understand the definition of connection count