def METHOD_NAME(self):
    '''Returns number of segments '''
    out = PSQL.run_sql_command("select count(*) from gp_segment_configuration where content != -1 and role = 'p' and status = 'u'", flags='-q -t', dbname='template1')
    for line in out:
        return line.strip()