#!/usr/bin/perl -w

use strict;
use v5.30;

my $count;

while (<>) {
	chomp;
	next if /\[[^\]]*(\w)(?!\1)(\w)\2\1/;
	next if !/(\w)(?!\1)(\w)\2\1/;
	$count++;
	say;
}

say $count;
