How to get volume and model in the scene in the python code?

I loaded a volume, in the scene and created a model. Below the data tree structure you can see the data shown in the figure. i want to get them in python code,The following:
model = slicer.mrmlScene.GetNumberOfNodesByClass(“vtkMRMLModelHierarchyNode”)
volume = slicer.mrmlScene.GetNumberOfNodesByClass(“vtkMRMLVolumeHeaderlessStorageNode”)
Is it possible to do this, but I test seems to have some problems, can you solve it? Thank you!

If you put a subject hierarchy tree widget into your module, you can get the current selection by calling currentItem().