[VOL-3641] Testing ONU flow count per OLT

Change-Id: Idc95c77b6fd456c30111599146148469275b5876
diff --git a/libraries/utils.robot b/libraries/utils.robot
index a141cf4..7f161d2 100644
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -587,6 +587,17 @@
     END
     [Return]    ${olt_device_id}
 
+Get Num of Onus From OLT SN
+    [Documentation]    Retrieves the corresponding number of ONUs for a given OLT based on serial number specified
+    [Arguments]      ${serial_number}
+    ${num_of_olt_onus}=    Set Variable    0
+    FOR    ${I}    IN RANGE    0    ${olt_count}
+        ${sn}=    Get From Dictionary    ${olt_ids}[${I}]    sn
+        ${num_of_olt_onus}=    Run Keyword IF    "${serial_number}"=="${sn}"
+        ...    Get From Dictionary    ${list_olts}[${I}]    onucount    ELSE    Set Variable    ${num_of_olt_onus}
+    END
+    [Return]    ${num_of_olt_onus}
+
 Validate ONUs After OLT Disable
     [Documentation]    Validates the ONUs state in Voltha, ONUs port state in ONOS
     ...    and that pings do not succeed After corresponding OLT is Disabled