I have the below HTML DOM
The attribute value will always be the default value so you must filter through the input boxes and check the value like this code below
$('#container input[type="text"]').filter(function () { return this.value.length > 0 }).length;
DEMO