Hi @sundarsritharan
You have two options here:
[1] Use the AEP UI to obtain the latest Segment Job ID via the Network Console and look for 'segmentedProfileCounter' which will then list all the segment IDs within the current sandbox and the total profiles qualified.

Steps:
[1] AEP UI > Segments
[2] Open Developer tools and switch to Network
[3] Filter by jobs? (as we are looking for the latest segment job)
[4] Select the jobs request and switch to 'Preview'
[5] Locate segmentedProfileCounter (you can right click here and copy the object to a local text file)
Alternatively you can use the Segmentation Service API if you dont have access to the AEP UI:
Please see here
Steps
curl --location --request GET 'https://platform.adobe.io/data/core/ups/segment/jobs?limit=1' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ... ' \
--header 'x-api-key: <x-api-key> \
--header 'x-gw-ims-org-id: <YOUR-IMS-ORG-ID@AdobeOrg' \
--header 'x-sandbox-name: prod' \
The query string 'limit=1' here will pull in the 'latest succesfull' Segment Job (simialr to the AEP UI steps), so if there is currentl a segment job in a PROCCESSING state this will be ingored.
Within the response do a CTRL+F (find) for 'segmentedProfileCounter' and copy this locally.
Only caveat here is that the segments are not in friendly-name format you will have to use the API ('GET Segment Definition by ID'), or the UI to lookup each segment ID to get the segment names.
Hope this helps!
Joshua