lib/test.sh: replace LTP_TST_CNT with TST_COUNT

The tools/apicmds require TST_COUNT to be set.

Also export TCID and TST_TOTAL.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
tools/apicmd: add tst_get_unused_port

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>