Added new function 'countNumberOfAgents()' to prevent user being able to double click on canvas to create a statechart element even when no agents exist in model.