Using the COUNT Clause

Use the COUNT clause to set the number of items that are to be used in the system-descriptor area. If you allocate a system-descriptor area with more items than you are using, you need to set the COUNT field to the number of items that you are actually using. The following example shows a fragment of the Informix® ESQL/C program:
EXEC SQL BEGIN DECLARE SECTION;
   int count;

EXEC SQL END DECLARE SECTION;

EXEC SQL allocate descriptor 'desc_100'; /*allocates for 100 items*/
   count = 2;
EXEC SQL set descriptor 'desc_100' count = :count;