can you incorporate a function to count the number of objects? maybe using the tensorflow object counting api