$grep -e "^[ATCGN]" filename.fastq | head -n 5000000 | grep --color "CAGATCTGTGCAGG"
#search for lines that start with one of the characters ATCGN (grep -e)
#take the first 5M lines (head)
#search for barcode+cutsite, color matches (--color)
#(add -c to the final grep command to get a count of number of lines)