detail::count_records() counts the number of occurences of a line starting with "@", to get the number of FASTQ records. This does not work well in the case where a FASTQ quality string begins with "@". The proper way to count the records in a FASTQ file is to get the line count, then divide by 4.