#!/bin/bash

f() {
seq $1|factor|egrep -c :.\\S+$
}

for testcase in 1 2 5; do
    f $testcase
done
    