Counting agents passed through the block

To know the number of agents that passed through the flowchart block, you should use the function count() of the corresponding port of the object. For example, if you have source object and want to know how many agents left its output port out, type: source.out.count() 

To know the name of the object's port, please refer to the description of the object in the Library Reference Guide. The names of the object ports are shown on the object figure at the top of the page:


Statistics on agent throughput

AnyLogic also displays statistics on agent throughput through the flowchart blocks at the model runtime by displaying text labels with some stats near block icons. 

To enable the display of counters, click the small triangle in the upper left or right corner of the block:

You can totally switch on/off all the counters in the AnyLogic Preferences.