Simple Object Detection
First, you have to have an object detector for recognizing different objects. After that, you have to post-process the outcomes of your detector to count the numbers. Basically, you cannot recognize all objects due to the fact that the number of labels that a detector finds is limited. I highly recommend you using built in models in the libraries you mentioned due to this reason that training detector models are very time consuming and need appropriate hardwre. If you want to learn something, take a look at papers that already exist and try to implement them. For this case there are numerous studies that I separate them in this way. 


Pixel-wise classification based techniques
YOLO-based techniques


This is a general classification that there may not be any consensus on that but is something that shows you the mainstream directions. 

I guess the ImageNet data-set contains the label clock. Try to use them alongside another label after implementing the model you want. Don't train your model using all the labels which takes to much time.