added p-get-file-index and p-get-file-count functions