fwk: Refactor fwk_module_get_element_count & fwk_module_get_sub_element_count
Refactor both fwk_module_get_element_count and fwk_module_get_sub_element_count to return a status code and store the actual count in a pointer. This avoids returning -ve value due to any wrong configuration and use -ve values improperly.
Signed-off-by: Mina Aziz mina.aziz@arm.com