# awk -F ',|-' -f part1.awk input ($3>=$1 && $4<=$2) || ($1>=$3 && $2<=$4) {n++} END {print n}