let count=0;
for(let h = 0; h < posts.snapshotLength; h++) {
let post = posts.snapshotItem(h);
if(post.textContent.startsWith("2018/10/04")){count++}
}
alert(count);