This is hole counting
Hole 1 = (0,0)(1,0)(2,0)(2,1)(2,2) all connected so one hole
Hole 2 = (1,3)
Hole 3 = (3,4)
In the second example the 3 zeroes is hole and (1,3) last is another hole