When I compile the foo.bde it creates a library entity called "counter". How do I change this so that the entity will be called XYZ?
In order to change the entity name please do the following:
Open foo.bde file.
Select Diagram -> Code Generation Settings.. from the main menu.
In the Code Generation Settings window change the entity name in the Entity field to a desired name. Click OK.
Compile the foo.bde file.