"Counting" Open Files

This question came up at work.

Can one write a routine that determines the number of file handles and the
number of open files?

There's a program at work that eats file handles, but slowly, over the
course of a day the user will use p her 60 file handles & crash. Debugging
the application is low priority, but a sentinel routine that kept track of
open files would make it a cinch to debug.

Can the handles be observed/monitored in Turbo De{*word*81}? This is the only
bug I've not been able to crack by use of the de{*word*81}.

Rick
Rick H...@aol.com