Tools: Manifest: Refine Partition type counting

- Count FF-M compliant Secure Partitions only(PID not set or >= 256)
- Simply the 'if' checks

Change-Id: Ideb8481e41685cfcf6a3f955f1e11ed99d2d830d
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index cb742c6..3fd8f5c 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -176,14 +176,12 @@
         with open(manifest_path) as manifest_file:
             manifest = manifest_validation(yaml.safe_load(manifest_file), pid)
 
-        # Count the number of IPC partitions
-        if manifest['psa_framework_version'] == 1.1 and manifest['model'] == 'IPC':
-            ipc_partition_num += 1
-        elif manifest['psa_framework_version'] == 1.1 and manifest['model'] == 'SFN':
-            sfn_partition_num += 1
-        elif 'services' in manifest.keys() or 'irqs' in manifest.keys():
-            # This is only to skip Library Model Partitions
-            ipc_partition_num += 1
+        if pid == None or pid >= 256:
+            # Count the number of IPC/SFN partitions
+            if manifest['psa_framework_version'] == 1.1 and manifest['model'] == 'SFN':
+                sfn_partition_num += 1
+            else:
+                ipc_partition_num += 1
 
         manifest_out_basename = os.path.splitext(os.path.basename(manifest_path))[0]