<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
$('#count-blocks').on('click', function(ev) {
ev.preventDefault();
var hiddenBlocksQuantity = 0;
$('div').each(function() {
var isHidden = ($(this).css('display') === 'none');
if (isHidden) {
hiddenBlocksQuantity++;
}
})
alert ('There is ' + hiddenBlocksQuantity + ' hidden blocks');
});