def METHOD_NAME(reqmgrOutDsets, cmswebUrl):
    """
    Get total number of lumi sections in each dataset
    """
    if 'testbed' in cmswebUrl:
        dbsUrl = cmswebUrl + "/dbs/int/global/DBSReader"
    else:
        dbsUrl = cmswebUrl + "/dbs/prod/global/DBSReader"
    dbsOutput = {}
    for dataset in reqmgrOutDsets:
        fullUrl = dbsUrl + "/filesummaries?" + urlencode({'dataset': dataset})
        data = json.loads(getContent(fullUrl))
        if data:
            dbsOutput[dataset] = data[0]['num_lumi']
        else:
            dbsOutput[dataset] = 0
    return dbsOutput