el FIBPlus ya tiene una funcion para que hace exactamente el
Código SQL
[-]SELECT COUNT(*) FROM Table1
Código Delphi
[-]function RecordCountInQuery(FQuery: TFIBQuery): integer;
muy funcional para que no hagas otra sentencia porque se le llena el codigo de sentencias sql repetidas pero tiene unas limitaciones
Unit
CommonIB
function RecordCountInQuery(FQuery: TFIBQuery): integer;
Description
Call RecordCountInQuery to get a number of records, which are returned by the query (FQuery). The procedure tries to change a query text in FQuery.SQL and executes changed query. For example, if you set FQuery.SQL to 'SELECT * FROM Table1' RecordCountInQuery executes the following query: SELECT COUNT(*) FROM Table1. It allows getting number of result records for a query without fetching records. However, this function has some limitations. You can not use this function for queries, which include GROUP BY, DISTINCT and UNION options.