Count the number of documents opened

Hi, I have a question to ask.

How do i have a counter that count the number of documents that have been open in the same database? The Counter i am deciding to put, is in the same databse.

Thanks and regards