How to count objects in real time using opencv and an android device?

Hello everyone, I’m new here. I want to count objects in real time using an object detection architecture in an android device, I’ve seen some APIs for counting objects but all of them are in python code and use opencv. How can I implement it in my android device? I’ve been searching and coding for a long time, but I have not gotten answers.
For more information, I’m going to train a custom object detector like YOLO-tiny or SSD. However I don’t know how to count objects using opencv in android after training? Could you give me an advice? please. Thank you in advance.