For a Frame object named Frame1, to find the number of objects within the frame, use the following syntax:
var numOfChildren = Frame1.GetNumberChildren()