Doing a file count check

Does anyone know if I can use nagios to do a file count on a directory and set off a warning if the number of files is greater than x? How would I set this up?
Sorry if this has already been covered, but my search came up empty.
Thanks,
Rob

nagiosexchange.org/Windows.4 … nagext_pi1[p_view]=199