If you have deployed the code outside of the page shortcode or widget then something is probably being missed. Is there no way you can use the shortcode on a page to check functionality? Also, check what the $_POST variable holds after submission on your page, that might help you debug.
Something is clearly going very wrong in your deployment of the code outside of the intended Widget or shortcode. For it to be returning just an integer number is nothing at all like what it should be returning.
I’d advise you start over and try to use the plugin as it’s designed within your site.