         }
     }
 
+    /// Counts rows in a table. This is a helper for executing a SELECT count(...) FROM statement and reading the
+    /// result.
+    ///
+    /// :param: from        The name of the table to select from, including any JOIN clauses.
+    /// :param: columns     The columns to count. If nil, then 'count(*)' is returned.
+    /// :param: whereExpr   The WHERE clause. If nil, then all rows are returned.
+    /// :param: parameters  An array of parameters to bind to the statement.
+    /// :param: error       An error pointer.
+    ///
+    /// :returns:   The number of rows counted, or nil if an error occurs.
+    ///
     public func countFrom(from:        String,
                           columns:     [String]? = nil,
                           whereExpr:   String? = nil,

        return prepareStatement(join(" ", fragments), error: error)
    }

    public func deleteFrom(tableName:   String,
                           whereExpr:   String? = nil,
                           parameters:  [Bindable?] = [],

        return numberOfChangedRows
    }
    
    /// Updates table rows. This is a helper for executing an UPDATE ... SET ... WHERE statement.
    ///
    /// :param: tableName   The name of the table to update.
    /// :param: set         The updated values, keyed by column names.
    /// :param: whereExpr   A WHERE clause to select which rows to update. If nil, all rows are updated.
    /// :param: parameters  Parameters to the WHERE clause.
    /// :param: error       An error pointer.
    ///
    /// :returns:   The number of rows updated, or nil if an error occurs.
    ///
    public func update(tableName:   String,
                       set:         [String:Bindable?],
                       whereExpr:   String? = nil,
