#!/bin/bash

#
# Count the number of alignments in a SAM file
# Works with piped input.
#

awk 'BEGIN {i = 0} {if(!($1 ~ /^@/ || $1 == "'""'")) {i += 1;}} END {print i}'
