You need to get the count, based on your slder query (or your var suma, which you'll need to make a global) asynchronously via another jsonp call. I answered this a while ago at: https://stackoverflow.com/a/16217367/1211981 There is no way to get this value via your slider handler. You'll need a separate function FT API call to get the count and set it after the fact.
var count_qry = 'select count() from "1BV8..." where ' + suma;
See this answer https://stackoverflow.com/a/9778985/1211981 and look for the getFTCount() function. Note: this code predates the FT API 1.0 so the AJAX end points have changed.
Adding code re: my comment below. Change this:
var getCount = $.get(queryurl,
function (data) {
try {
.. .
To:
function getCount(){
$.get(queryurl,
. . .
}
Then add getCount() after this line.
window.suma = "start > 1900 AND start <" + ui.value + " AND end >" + ui.value;
getCount();