enb,ue,process: move stdout counter helper to process objects

this patch adds the stdout counter to count events happening
on the stdout (known from the UE already) to the common
process class so they can also be used from the eNB (and other objects)

In addition, we add a PRACH counter to be used for tests.

Change-Id: I434f072b8aa6f4dce9f90889c6b40832f6798ff8
diff --git a/src/osmo_gsm_tester/core/process.py b/src/osmo_gsm_tester/core/process.py
index bac258a..e305c64 100644
--- a/src/osmo_gsm_tester/core/process.py
+++ b/src/osmo_gsm_tester/core/process.py
@@ -164,6 +164,15 @@
         self.outputs[name] = (path, f)
         return f
 
+    def get_counter_stdout(self, keyword):
+        # Match stdout against keyword
+        n = 0
+        stdout_lines = (self.get_stdout() or '').splitlines()
+        for l in stdout_lines:
+            if keyword in l:
+                n += 1
+        return n
+
     def launch(self):
         preexec_fn = None
         log.dbg('cd %r; %s %s' % (