There is no point for the COUNT
command, so you can use a COMPUTE noque_o_noria = 1
instead and then specify an ELSE
condition, e.g.
DO IF (((p7_1 = 1) | (p7_2 = 1)) & (periodo = 2)).
COMPUTE noque_o_noria = 1.
ELSE.
COMPUTE noque_o_noria = 0.
END IF.