A sequence reads record values from a table. The table returned by your statement contains a single record with a single value. To read it, use Table.SearchAll, not Table.Search (Table.Search searches for a record with specific values in fields, see the documentation).
static var Manifold: Manifold.Context;
static function Main()
var app = Manifold.Application;
var db = app.GetDatabaseRoot();
// run query
var table = db.Run("SELECT Count(*) AS c FROM [mfd_root];");
// retrieve results
var fields = new String;
fields = 'c';
var sequence = table.SearchAll(fields);
if (!sequence.Fetch()) // read one record
var values = sequence.GetValues(); // all returned fields
var count = values.Data; // first field value
We agree this looks complex, but as a pro, this same workflow handles tons of different scenarios.
Currently, we are concentrating on mainly implementing object model calls that cannot be done efficiently using already existing calls, leaving implementing quality of life functions like counting the number of records in a table to the script writer / community. In the future we will provide our own utility functions as well.
We have tons of script examples in the API documentation, they are in C# / VB.NET / Python, but perhaps still useful for understanding how things are tied together.