JSFiddle - React, Tailwind, and code Playground

HTML

<form action="http:test.php" method="post" name="testform" id="testform">
  <small> Имя</small>
  <input type="text" name="name" id="name" value="" />
  <small> Почта</small>
  <input type="text" name="mail" id="email" value="" />
  <small> Количество товара равно:</small>
  <span id="count_tovar"><script type="text/javascript" src="https://accounts.e-autopay.com/external/widgets/pincodes/246887"></script></span>
  <input type="number" name="count" id="count" value="1" required="required" />
  <input name="submit" type="submit" id="submit" value="Отправить" />
</form>

JavaScript

alert(document.getElementById("count_tovar").innerText);