add a check that all components started by an app are removed when it is deactivated

Change-Id: Ic39b5f21123aa792d436ffcf5fbb8cc610efc535
diff --git a/tools/test/scenarios/bin/onos-find-component-count b/tools/test/scenarios/bin/onos-find-component-count
new file mode 100755
index 0000000..6bac52c
--- /dev/null
+++ b/tools/test/scenarios/bin/onos-find-component-count
@@ -0,0 +1,17 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Checks if the given number of expected components are present.
+# -----------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+aux=/tmp/stc/stc-$$.log
+trap "rm -f $aux $aux.1 $aux.2 2>/dev/null" EXIT
+
+name=$2
+expected=$3
+
+count=`onos ${1} onos:scr-list | wc -l | xargs`
+
+echo "@stc ${name}count=${count}"