…monitor the number of objects in a folder…
Monitor? Do you need to know when the number changes? Does it need to be real-time or do you only need to know on a periodic (hourly? daily?) basis?
Folder? Are you interested in actual *FLR (/QDLS folder) objects or do you need more generic DIR (directory) objects? If you need directories, are they in a particular file system, e.g., /root or /QOpenSys?