Yes, it could be done.

In the UDF library there are many UDFs you could use as inspiration. Several that count, several that remove dups, etc.

Start by using the ReadFile() UDF to read it into an array. Then modify one of the UDFs that remove dups from an array to also pass the number of elements removed.

How hard can it be?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.