<form id="count_form" action="<?php echo esc_url( $count->get_count_url() ); ?>" method="post">
var url = $("#count_form").attr("action");