I have come up with something on my own. It should be enough to use this library
psutil in
Python 2.7. My process name will be constant, because I always use the same program to run my mp3 / video files.
1. Find PID of my process
2. When I have the PID i can check what files are currently opened by my process.
3. Always remember last opened file. If the current file is different from last one, then increment current's file open count by 1.
4. Use while loop to check this in background.
Here's some small amount of code but in general the soultion is quite simple :)
import psutil
process_list = psutil.pids()
for i in process_list:
temp_process = psutil.Process(i)
try:
if (temp_process.name()=="mpc-hc64.exe"):
print temp_process.cmdline()
print temp_process.open_files()
except:
print "no process name"