Number of times an audio file has been played using custom player

Firstly create a metabox with a custom field to add a counter to your song . As like

add_action( "add_meta_boxes", "amz_add_custom_meta_box" );
function amz_add_custom_meta_box() {
   global $post;
   if ( $post->post_type == 'music' ) {
      add_meta_box( "counter-meta-box", "Total Played", "_custom_meta_box_markup", "music", "side", "high", null );
   }
}

Then, there is a function on scamp_player i.e.

onTrackEnd: function() {} 

you could write a Ajax request on this function and update your metafield. This function will be called when the track is ended.

Hope this helps!!
Happy coding