Add macro to calculate number of elements in an array

This patch defines the ARRAY_SIZE macro for calculating number of elements
in an array and uses it where appropriate.

Change-Id: I72746a9229f0b259323972b498b9a3999731bc9b
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index 0959c89..b36c9d3 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -108,6 +108,8 @@
 #include <stdint.h>
 #include <stddef.h>
 
+#define ARRAY_SIZE(a)	(sizeof(a) / sizeof((a)[0]))
+
 /*******************************************************************************
  * Structure used for telling the next BL how much of a particular type of
  * memory is available for its use and how much is already used.