Detect the length of 'X' pattern