How do I edit the WordPress post.php file?

You’ll want to add a custom meta box, and put your code in the corresponding callback.

It sounds like you’ve already set up your custom post type, so just make sure you have the last line to register your meta box callback:

register_post_type( 'wpse_cpt',
        array(
            'labels' => array('all','the','labels'),
            'public' => true,
            'supports' => array( 'title', 'editor', 'thumbnail', 'comments' ),
            'capability_type' => 'post',
            'rewrite' => array("slug" => "wpse-cpt"),
            'menu_position' => 5,
            'register_meta_box_cb' => 'add_wpse_metabox'// <- ADD THIS LINE
        )
    );
}

Then add the meta box

function add_wpse_metabox() {
    add_meta_box('wpse_form_limit', 'Form Limits', 'wpse_form_limit', 'wpse_cpt', 'side', 'default');
}

Then add the callback with the content for your meta box:

function wpse_form_limit() {
    if ($limit_reached) :
        echo "Limit reached";
    else :
        echo "There's room for more!"
    endif;
}

Your code will look different (you won’t get far copying and pasting this), but this is how you’d get custom content in the admin.