def METHOD_NAME(albums):
    albums_str=",".join(map(str, map(int,albums)))
    ret=0
    if albums:
        sql="SELECT count(distinct(g.user_id)) as geotagging_user_count ";
        sql=sql + " FROM project_albumphoto as ap, project_geotag as g ";
        sql=sql + " WHERE ap.album_id IN (" + albums_str + ") AND g.photo_id=ap.photo_id"
        cursor = connection.cursor()
        cursor.execute(sql)
        row = cursor.fetchone()
        ret = row[0] or 0
    return ret