count=`cat a.txt b.txt | grep "${検索条件}" | wc -l`
これじゃあかんの?