Count the number of times that a single "-----------\n" separated record contains both "A=2" and "dummy=2" and the number of records that do not have "dummy=2" in compressed file "file.gz"
zcat file.gz | awk -v RS="-----------\n" '/A=2[ ,\n]/ && /dummy=2[ ,\n]/{count++} !/dummy=2[ ,\n]/{other++} END{print "Final counter value=",count, "; other=", other}'