def NumberOfNodes_metric(bpmn_graph):
activities_count = all_activities_count(bpmn_graph)<EOL>control_flow_count = all_control_flow_elements_count(bpmn_graph)<EOL>return activities_count + control_flow_count<EOL>
Returns the value of the Number of Nodes metric
("Number of activities and routing elements in a model")
for the BPMNDiagramGraph instance.

:param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.